|
@@ -26,7 +26,7 @@ main = hakyll $ do
|
|
|
>>= loadAndApplyTemplate "templates/default.html" defaultContext
|
|
|
>>= relativizeUrls
|
|
|
|
|
|
- tags <- buildTags "posts/*" (fromCapture "tags/*.html")
|
|
|
+ tags <- buildTags "posts/*.md" (fromCapture "tags/*.html")
|
|
|
|
|
|
tagsRules tags $ \tag pattern -> do
|
|
|
let title = "Posts tagged \"" ++ tag ++ "\""
|
|
@@ -42,7 +42,7 @@ main = hakyll $ do
|
|
|
>>= loadAndApplyTemplate "templates/default.html" ctx
|
|
|
>>= relativizeUrls
|
|
|
|
|
|
- match "posts/*" $ do
|
|
|
+ match "posts/*.md" $ do
|
|
|
route $ setExtension "html"
|
|
|
compile $ pandocCompiler
|
|
|
>>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
|
|
@@ -64,6 +64,18 @@ main = hakyll $ do
|
|
|
>>= relativizeUrls
|
|
|
|
|
|
|
|
|
+ create ["new_index.html"] $ do
|
|
|
+ route idRoute
|
|
|
+ compile $ do
|
|
|
+ posts <- recentFirst =<< loadAll "posts/*"
|
|
|
+ let post =
|
|
|
+ head (return posts)
|
|
|
+ pandocCompiler
|
|
|
+ >>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
|
|
|
+ >>= loadAndApplyTemplate "templates/default.html" (postCtxWithTags tags)
|
|
|
+ >>= relativizeUrls
|
|
|
+
|
|
|
+
|
|
|
match "index.html" $ do
|
|
|
route idRoute
|
|
|
compile $ do
|