vanilla-hugo/layouts/partials/nameinseries.html

9 lines
330 B
HTML
Raw Permalink Normal View History

{{- $term := index (.page.GetTerms "series") 0 -}}
{{- $divider := $term.Params.divider -}}
{{- if (and $divider (strings.Contains .page.Title $divider)) -}}
{{- $rest := after 1 (split .page.Title $divider) -}}
{{- .scratch.Set "name" (delimit $rest $divider) -}}
{{- else -}}
{{- .scratch.Set "name" .page.Title -}}
{{- end -}}