Skip to content

Instantly share code, notes, and snippets.

@beastaugh
Created April 6, 2011 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beastaugh/905668 to your computer and use it in GitHub Desktop.
Save beastaugh/905668 to your computer and use it in GitHub Desktop.
routeArticle :: Routes
routeArticle = customRoute (flip replaceExtension ".html" . dropDate)
dropDate :: Identifier -> FilePath
dropDate ident = let file = toFilePath ident
in replaceFileName file (drop 11 $ takeFileName file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment