Hello,
Recommend the breadcrumbs plugin for Jekyll 3.
So that he could work well at GitHub.
Hello,
Recommend the breadcrumbs plugin for Jekyll 3.
So that he could work well at GitHub.
I’ve found that this snippet has done me well, not too bloated and avoids using a bespoke plugin setup http://stackoverflow.com/a/9633517/4572588
Breadcrumbs is a topic that interests me. The approach you take depends on how your files are set up and what you want the output to show. I have breadcrumbs set up on a site here. For that site, here’s the code I’m using:
<a href="http://idratherbewriting.com" class="noCrossRef productSubtitle"> Home </a> > <a class="noCrossRef productSubtitle" href="{{site.url}}">Learn API Doc</a> > {{page.path | remove: "_docs/" | split: "/" | first }}
That site is somewhat unique b/c it’s a subsite (Learn API Doc) from another site (my blog).
The key piece of code here is page.path
, which will render the path to the page. For this item, the path would be docs/Documenting Non-Reference Content/docapis_create_user_guide.md.
However, I didn’t want to include the collection path, so I removed that.
At any rate, look at how your files are set up, see what paths you get from page.path
or page.permalink
and then look at Liquid filters you can use to split the path apart, remove or add parts to it, and render it as you want it.
Thank you very much.
the question is closed.