Given a page
- located at
/content/authorship/author-1.md
, and - with the front matter parameter
url: authors/author-1/portrait
,
the page is published as expected under public/authors/author-1/portrait
.`
The breadcrumb.html
partial below, however, finds the authorship section as its ancestor, and not, as I was expecting, the section where it is published: authors/author-1
.
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
{{ range .Ancestors.Reverse }}
{{if not .Page.IsHome}}
<li class="breadcrumb-item">
<a href="{{ .RelPermalink }}">
{{ with .Params.authors }}
{{ delimit . ", " " og " }}:
{{ end }}
{{ .LinkTitle }}
</a>
</li>
{{end}}
{{ end }}
<li class="breadcrumb-item active">
<a aria-current="page" href="{{ .RelPermalink }}">
{{ with .Params.authors }}
{{ delimit . ", " " og " }}:
{{ end }}
{{ with .Page.Params.partTitle }}
{{ . }}:
{{end}}
{{ .LinkTitle }}
</a>
</li>
</ol>
</nav>
An empty breadcrumb from the parent (headless an untitled) authorship section is
rendered:
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href=""> </a>
</li>
<li class="breadcrumb-item active">
<a aria-current="page" href="/authors/author-1/authorship/">Authorship</a>
</li>
</ol>
What I’m looking for is this:
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/authors/">authors</a>
</li>
<li class="breadcrumb-item">
<a href="/authors/author-1">Author 1</a>
</li>
<li class="breadcrumb-item active">
<a aria-current="page" href="/authors/author-1/authorship/">Authorship</a>
</li>
</ol>
I am running Hugo v0.134.2