breadcrumbs puts a Home › Articles › This page trail above a page's title and gives search engines the same trail (BreadcrumbList) once installed. author-box shows who wrote an article, at its end, from data/authors.yaml: the author its front matter names, by id or name, else the site's author. series shows "Part 2 of 5" in a series, every part, and the previous and next part; parts follow their part: numbers, or go oldest first. Two template functions they're built on: trail . (the pages above a page, by address) and series . (a page's series, in reading order).
10 lines
478 B
HTML
10 lines
478 B
HTML
{{/* The trail from the home page down to this one: Home › Articles › This page. */}}
|
||
{{ $t := trail . }}{{ if gt (len $t) 1 }}
|
||
<link rel="stylesheet" href="{{ asset "packs/breadcrumbs/breadcrumbs.css" }}">
|
||
<nav class="crumbs" aria-label="Breadcrumb">
|
||
<ol>
|
||
{{ range $i, $p := $t }}{{ if eq $p.Path $.Path }}<li><span aria-current="page">{{ $p.Title }}</span></li>{{ else }}<li><a href="{{ $p.Href }}">{{ $p.Title }}</a></li>{{ end }}{{ end }}
|
||
</ol>
|
||
</nav>
|
||
{{ end }}
|