Hello Sam,
I think there are two possible solutions.
A first solution assumes you're not using the actual body of the post
in the sidebar. If this is the case, you can just create a list of
"fake items" which represent the posts. You can do that like this:
fakePosts :: Compiler [Item String]
fakePosts = do
identifiers <- getMatches "posts/*"
return [Item identifier "" | identifier <- identifiers]
Then, you can just apply templates to this list, all metadata will be
accessible. I think this is the easiest and most straightforward solution.
Alternatively, you can create two versions for each post page. This
tutorial [1] has more info on how to do that. Then, you use one
version for the sidebar and the other for the actual pages.
Let me know if you need more help with either solution.
[1]:
http://jaspervdj.be/hakyll/tutorials/06-versions.html
Hope this helps,
Peace,
Jasper
On Wed, Mar 13, 2013 at 5:25 PM, Samuel Tardieu <
s...@rfc1149.net> wrote:
> Hi.
>
> I'm trying to include a list of recent posts in the sidebar of every page on
> my site. However, Hakyll is not happy and detect a dependency cycle on posts
> pages, since indeed, there is one.
>
> Is there a recipe to include such a list in the sidebar?
>
> Sam
>
> --
> 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+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>