1
goldsmith-samples/bootstrap/content/layouts/breadcrumbs.gohtml

17 lines
523 B
Plaintext

{{define "breadcrumbs"}}
{{if and .Meta.CrumbParent .Meta.Crumbs}}
<div>
<nav class="breadcrumb">
{{range .Meta.Crumbs.Ancestors}}
<a href="/{{.File.Path}}" class="breadcrumb-item">{{.File.Meta.Title}}</a>
{{end}}
{{if .Meta.Title}}
<span class="breadcrumb-item active">{{.Meta.Title}}</span>
{{else if eq .Meta.Layout "tag"}}
<span class="breadcrumb-item active">Tagged &ldquo;{{.Meta.Tags.Index}}&rdquo;</span>
{{end}}
</nav>
</div>
{{end}}
{{end}}