I know this post is a bit outdated, but since it doesnโt seem to be resolved, this is how I did it.
First save the snapshot as described in @jaspervdj:
match "posts/*" $ do route $ setExtension "html" compile $ pandocCompiler >>= loadAndApplyTemplate "templates/post.html" postCtx >>= saveSnapshot "content" >>= loadAndApplyTemplate "templates/default.html" postCtx >>= relativizeUrls
Then for index.html upload all snapshots of messages using loadAllSnapshots :
match "index.html" $ do route idRoute compile $ do posts <- recentFirst =<< loadAllSnapshots "posts/*" "content" let indexCtx = listField "posts" postCtx (return posts) `mappend` defaultContext
Since the snapshot was taken before applying the default template, the value of $body$ inside $for(posts)$ will be only the content of each message template without the default template applied.
source share