|
@@ -52,7 +52,7 @@ main = hakyll $ do
|
|
|
create ["archive.html"] $ do
|
|
|
route idRoute
|
|
|
compile $ do
|
|
|
- posts <- recentFirst =<< loadAll "posts/*"
|
|
|
+ posts <- recentFirst =<< loadAll "posts/*.md"
|
|
|
let archiveCtx =
|
|
|
listField "posts" postCtx (return posts) `mappend`
|
|
|
constField "title" "Archives" `mappend`
|
|
@@ -67,9 +67,7 @@ main = hakyll $ do
|
|
|
create ["new_index.html"] $ do
|
|
|
route idRoute
|
|
|
compile $ do
|
|
|
- posts <- recentFirst =<< loadAll "posts/*"
|
|
|
- let post =
|
|
|
- head (return posts)
|
|
|
+ post <- fmap (head) recentFirst =<< loadAll "posts/*.md"
|
|
|
pandocCompiler
|
|
|
>>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
|
|
|
>>= loadAndApplyTemplate "templates/default.html" (postCtxWithTags tags)
|