Discussion:
[hakyll] Sibling navigation?
Nick Yakimov
2015-11-11 08:08:40 UTC
Permalink
I’m looking for a way to insert a list of links to siblings into a given
page.

E.g., granted I have a directory /static/category/ which contains a number
of *.markdown files, I’d like to have each generated page to have links to
other /static/category/*.markdown files, preferably with proper titles.

Unfortunately, most direct approach (using loadAll with pattern) leads to
circular dependencies. Is there a way to resolve this?

Thanks in advance.
​
--
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.
Julien Tanguy
2015-11-16 10:55:58 UTC
Permalink
Hello Nick,

One way to break the circular dependencies is to use different versions of
the markdown files.
You would have one version of the file with no links (for instance a raw
version of your page), and the links version would require these instead.
Make sure you add the version contraints on your patterns, as indicated in
[1].

Hope this helps,
Julien

[1]: http://jaspervdj.be/hakyll/tutorials/06-versions.html
Post by Nick Yakimov
I’m looking for a way to insert a list of links to siblings into a given
page.
E.g., granted I have a directory /static/category/ which contains a number
of *.markdown files, I’d like to have each generated page to have links
to other /static/category/*.markdown files, preferably with proper titles.
Unfortunately, most direct approach (using loadAll with pattern) leads to
circular dependencies. Is there a way to resolve this?
Thanks in advance.
​
--
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
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.
Loading...