mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2026-05-21 11:05:49 +00:00
87de3fb024
* feat(layouts): move all files in layouts/_default up to the layouts/ root. * feat(layouts): rename layouts/partials folder to layouts/_partials * feat(layouts): rename layouts/shortcodes folder to layouts/_shortcodes * feat(taxonomy): add new taxonomy layout template A template named taxonomy.html used to be a candidate for both Page kind term and taxonomy, now it’s only considered for taxonomy.
24 lines
1.0 KiB
HTML
24 lines
1.0 KiB
HTML
{{- if (.Param "ShowBreadCrumbs") -}}
|
|
<nav class="breadcrumbs" role="navigation" aria-label="Breadcrumb">
|
|
<a href='{{ "" | absLangURL }}'>
|
|
{{- i18n "home" | default "Home" -}}
|
|
</a>
|
|
{{- $url := replace .Parent.Permalink (printf "%s" site.Home.Permalink) "" }}
|
|
{{- $lang_url := strings.TrimPrefix (printf "%s/" .Lang) $url -}}
|
|
{{- $scratch := newScratch }}
|
|
{{- range $index, $element := split $lang_url "/" }}
|
|
{{- $scratch.Add "path" (printf "%s/" $element )}}
|
|
{{- $bc_pg := site.GetPage ($scratch.Get "path") -}}
|
|
{{- if (and ($bc_pg) (gt (len . ) 0))}}
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
</svg>
|
|
<a href="{{ $bc_pg.Permalink }}">
|
|
{{- $bc_pg.Name -}}
|
|
</a>
|
|
{{- end }}
|
|
{{- end -}}
|
|
</nav>
|
|
{{- end -}}
|