add scope partial

This commit is contained in:
la Fleur 2020-11-16 14:56:39 +01:00
parent 725478234e
commit 008cf21abf
2 changed files with 6 additions and 1 deletions

View File

@ -20,7 +20,7 @@
{{ range $.Site.Sections }} {{ range $.Site.Sections }}
{{ if eq $currentPage.Section .Section }} {{ if eq $currentPage.Section .Section }}
<span class="exposed"> <span class="exposed">
{{ .Title | markdownify }} {{ partial "scope.html" $currentPage }}
</span> </span>
{{ else }} {{ else }}
<a href="{{ .Permalink }}"> <a href="{{ .Permalink }}">

View File

@ -0,0 +1,5 @@
{{- $pathList := split (trim (path.Dir .RelPermalink) "/") "/" -}}
{{- range $i, $val := $pathList -}}
{{- $val -}}
{{- if ne $i (sub (len $pathList) 1) }} > {{ end -}}
{{- end -}}