Breadcrumb navigation #1990
-
I've been trying to implement breadcrumbs for my site for quite a long time. I've explored several automatic ways of doing it, but with no success as the structure of my site is not simple (problem are parent sections). I'm now trying to implement it in a more manual way, defining a new field in the front matter of my posts/projects etc. This
Now, the question is: how can I access the values of that array if I'd like to show those Thank you very much in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
This is would be a cool addition to many websites. Iterating over an array can be done with
Output:
|
Beta Was this translation helpful? Give feedback.
-
Founds this on the Hugo discourse: https://discourse.gohugo.io/t/snippet-partial-for-creating-breadcrumbs-uses-bootstrap-4/15426 Take a look at the recursive example, think you should be able to use it more or less out of the box. |
Beta Was this translation helpful? Give feedback.
This is would be a cool addition to many websites.
Take a look at bootstraps breadcrumb implementation: https://getbootstrap.com/docs/4.0/components/breadcrumb/
Iterating over an array can be done with
range
.Output: