j***@gmail.com
2018-03-10 14:48:01 UTC
The tutorial here
<https://javran.github.io/posts/2014-03-01-add-tags-to-your-hakyll-blog.html>
has instructions for how to add tag pages to a Hakyll blog, i.e.,
`tags/tag1.html`, `tags/tag2.html`, etc. But is there a way to have a
single page with a list of tags, and a list of posts with each tag? I'm
basically trying to recreate this page <http://jonreeve.com/tags/> from my
Jekyll website where I list all tags and categorize posts accordingly.
Here's what I have so far. (It's not working.)
create ["/tags.html"] $ do
route idRoute
compile $ do
tags <- buildTags "posts/*" (fromCapture "tags.html#*")
let tagsCtx =
listField "tags" postCtx (return tags) `mappend`
constField "title" "Tags" `mappend`
defaultContext
makeItem ""
-Jonathan
<https://javran.github.io/posts/2014-03-01-add-tags-to-your-hakyll-blog.html>
has instructions for how to add tag pages to a Hakyll blog, i.e.,
`tags/tag1.html`, `tags/tag2.html`, etc. But is there a way to have a
single page with a list of tags, and a list of posts with each tag? I'm
basically trying to recreate this page <http://jonreeve.com/tags/> from my
Jekyll website where I list all tags and categorize posts accordingly.
Here's what I have so far. (It's not working.)
create ["/tags.html"] $ do
route idRoute
compile $ do
tags <- buildTags "posts/*" (fromCapture "tags.html#*")
let tagsCtx =
listField "tags" postCtx (return tags) `mappend`
constField "title" "Tags" `mappend`
defaultContext
makeItem ""
= applyTemplate postListTemplate tagsCtx
= applyTemplate defaultTemplate defaultContext
= relativizeUrls
= cleanIndexUrls
Thanks in advance for any help you'd be able to provide!= applyTemplate defaultTemplate defaultContext
= relativizeUrls
= cleanIndexUrls
-Jonathan
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.