|
@ -196,7 +196,7 @@ main = (*>) (setEnv "AMC_LIBRARY_PATH" "/usr/lib/amuletml/lib/") $ hakyllWith co |
|
|
create ["archive.html"] $ do |
|
|
create ["archive.html"] $ do |
|
|
route idRoute |
|
|
route idRoute |
|
|
compile $ do |
|
|
compile $ do |
|
|
posts <- recentFirst =<< loadAll "posts/*" |
|
|
|
|
|
|
|
|
posts <- recentFirst =<< loadAll "pages/posts/*" |
|
|
let archiveCtx = |
|
|
let archiveCtx = |
|
|
listField "posts" postCtx (return posts) <> |
|
|
listField "posts" postCtx (return posts) <> |
|
|
constField "title" "Archives" <> |
|
|
constField "title" "Archives" <> |
|
@ -209,7 +209,7 @@ main = (*>) (setEnv "AMC_LIBRARY_PATH" "/usr/lib/amuletml/lib/") $ hakyllWith co |
|
|
match "pages/*.html" $ do |
|
|
match "pages/*.html" $ do |
|
|
route $ gsubRoute "pages/" (const "") |
|
|
route $ gsubRoute "pages/" (const "") |
|
|
compile $ do |
|
|
compile $ do |
|
|
posts <- fmap (take 5) . recentFirst =<< loadAll "posts/*" |
|
|
|
|
|
|
|
|
posts <- fmap (take 5) . recentFirst =<< loadAll "pages/posts/*" |
|
|
let indexCtx = |
|
|
let indexCtx = |
|
|
listField "posts" postCtx (return posts) <> |
|
|
listField "posts" postCtx (return posts) <> |
|
|
constField "title" "Home" <> |
|
|
constField "title" "Home" <> |
|
@ -241,7 +241,7 @@ main = (*>) (setEnv "AMC_LIBRARY_PATH" "/usr/lib/amuletml/lib/") $ hakyllWith co |
|
|
route idRoute |
|
|
route idRoute |
|
|
compile $ do |
|
|
compile $ do |
|
|
let feedCtx = postCtx <> bodyField "description" |
|
|
let feedCtx = postCtx <> bodyField "description" |
|
|
posts <- (take 10 <$>) . recentFirst =<< loadAllSnapshots "posts/*" "content" |
|
|
|
|
|
|
|
|
posts <- (take 10 <$>) . recentFirst =<< loadAllSnapshots "pages/posts/*" "content" |
|
|
renderRss rssfeed feedCtx posts |
|
|
renderRss rssfeed feedCtx posts |
|
|
|
|
|
|
|
|
postCtx :: Context String |
|
|
postCtx :: Context String |
|
|