Files
hinode/layouts/shortcodes/breadcrumb.html
2023-08-31 13:34:23 +02:00

19 lines
569 B
HTML

<!--
Displays a breadcrum for a specific page. The shortcode supports the following arguments:
"path" Optional path of the page, defaults to current page.
-->
{{- $error := false -}}
{{- $page := . -}}
{{- $path := .Get "path" | default "" }}
{{- if $path -}}
{{- $page = .Site.GetPage $path -}}
{{- if not $page -}}
{{- errorf "Invalid or missing value for param 'path': %s" .Position -}}
{{- $error = true -}}
{{- end -}}
{{- end -}}
{{- if not $error -}}
{{- partial "assets/breadcrumb.html" $page -}}
{{- end -}}