l***@public.gmane.org
2013-09-24 22:08:50 UTC
Greetings.
I am a Haskell noob playing around with hakyll.
I took the default site produced by hakyll-init and converted the
index.html to a index.markdown file. Not for any good reason, just to play
around. Here's the result: https://github.com/duk3luk3/hakylltestsite
Here's the code for the index.markdown:
match "index.markdown" $ do
route $ setExtension "html"
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let indexCtx =
listField "posts" postCtx (return posts) `mappend`
constField "title" "Home" `mappend`
defaultContext
getResourceBody
The result is not pretty. I've tried putting the ">== return .
renderPandoc" in any place, and I've tried using PandocCompiler instead of
getResourceBody. It never gets rendered properly.
What am I missing? How do I make Pandoc play nice with templates?
Best regards
Luke
I am a Haskell noob playing around with hakyll.
I took the default site produced by hakyll-init and converted the
index.html to a index.markdown file. Not for any good reason, just to play
around. Here's the result: https://github.com/duk3luk3/hakylltestsite
Here's the code for the index.markdown:
match "index.markdown" $ do
route $ setExtension "html"
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let indexCtx =
listField "posts" postCtx (return posts) `mappend`
constField "title" "Home" `mappend`
defaultContext
getResourceBody
= applyAsTemplate indexCtx
= loadAndApplyTemplate "templates/default.html" indexCtx
= relativizeUrls
= return . renderPandoc
Nothing else was changed in site.hs.= loadAndApplyTemplate "templates/default.html" indexCtx
= relativizeUrls
= return . renderPandoc
The result is not pretty. I've tried putting the ">== return .
renderPandoc" in any place, and I've tried using PandocCompiler instead of
getResourceBody. It never gets rendered properly.
What am I missing? How do I make Pandoc play nice with templates?
Best regards
Luke
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.