on master help sign in
Merge branch 'master' of git://github.com/seschwar/Hakyll into experimental

Conflicts: hakyll.cabal src/Text/Hakyll/Page.hs src/Text/Hakyll/Render/Internal.hs

commit06408148eef18707c32cad4d06e293c65962fe5c authorJasper Van der Jeugt <jaspervdj@gmail.com> dateMon 18 Jan 2010, 19:30 (17 years ago) parent673ed68e01531b
3 files changed+17−6
.gitignore+2 src/Text/Hakyll/File.hs+11−1 src/Text/Hakyll/Page.hs+4−5
.gitignore+2
@@ -9,7 +9,9 @@
99*.swp
1010*~
1111.DS_Store
12+TAGS
1213dist
14+tags
1315
1416# Ignore test builds.
1517tests/Tests
src/Text/Hakyll/File.hs+11−1
@@ -42,7 +42,17 @@ toCache path = "_cache" </> (removeLeadingSeparator path)
4242
4343-- | Get the url for a given page.
4444toURL :: FilePath -> FilePath
45−toURL path = if takeExtension path `elem` [".markdown", ".md", ".tex"]
45+toURL path = if takeExtension path `elem` [ ".markdown"
46+ , ".md"
47+ , ".mdn"
48+ , ".mdwn"
49+ , ".mkd"
50+ , ".mkdn"
51+ , ".mkdwn"
52+ , ".rst"
53+ , ".text"
54+ , ".tex"
55+ ]
4656 then flip addExtension ".html" $ dropExtension path
4757 else path
4858
src/Text/Hakyll/Page.hs+4−5
@@ -61,10 +61,9 @@ renderFunction ".html" = id
6161renderFunction ext = writeHtmlString writerOptions
6262 . readFunction ext defaultParserState
6363 where
64− readFunction ".markdown" = readMarkdown
65− readFunction ".md" = readMarkdown
66− readFunction ".tex" = readLaTeX
67− readFunction _ = readMarkdown
64+ readFunction ".rst" = readRST
65+ readFunction ".tex" = readLaTeX
66+ readFunction _ = readMarkdown
6867
6968-- | Read metadata header from a file handle.
7069readMetaData :: Handle -> Hakyll [(String, String)]
@@ -134,7 +133,7 @@ readPage pagePath = do
134133 , ("path", pagePath)
135134 ] ++ metaData
136135
137− seq (($|) id rdeepseq rendered) $ liftIO $ hClose handle
136+ seq (($|) id rdeepseq rendered) $ hClose handle
138137
139138 -- Cache if needed
140139 if getFromCache then return () else cachePage page