Discussion:
[hakyll] Question on tags in post-list
s***@gmail.com
2015-04-19 23:30:47 UTC
Permalink
Hi I am new to Hakyll and I am very pleased with what I can do so far. But
I am stumped right now with how tags are rendered. I started with the stock
hakyll-init files and added/modified a few things to fit my needs. So I've
added tags and they are rendered as hyperlinks correctly in the post.
However the hyperlinks don't show up in post lists and tags are only shown
as plain texts there. What controls the different behavior? In the html
templates for post and post-list I have the same pattern:

<div class="info">
$if(tags)$
- $tags$
$endif$
</div>

It appears that the post template loop is entered from site.hs match
post/*, which does
loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
while the post-list template is called by other matches/rules in site.hs
listField "posts" postCtx (return posts)
listField "posts" (postCtxWithTags tags) (return posts)
does not appear to solve the problem.

Any help appreciated.
--
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.
s***@gmail.com
2015-04-20 01:23:39 UTC
Permalink
It turned out that I had some version control issue on my part. All my tags
are now correctly hyperlinked and I think what worked was indeed the
Post by s***@gmail.com
It appears that the post template loop is entered from site.hs match
post/*, which does
loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
while the post-list template is called by other matches/rules in site.hs
listField "posts" postCtx (return posts)
listField "posts" (postCtxWithTags tags) (return posts)
--
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.
Loading...