diff --git a/layouts/blog/single.html b/layouts/blog/single.html index e558111..531c57d 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -33,10 +33,10 @@ {{ $pages := (site.Taxonomies.series.Get .Data.Term).Pages.ByDate.Reverse }} {{ end }} diff --git a/layouts/partials/nameinseries.html b/layouts/partials/nameinseries.html new file mode 100644 index 0000000..e70b162 --- /dev/null +++ b/layouts/partials/nameinseries.html @@ -0,0 +1,8 @@ +{{- $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 -}} diff --git a/layouts/partials/serieslink.html b/layouts/partials/serieslink.html index e6f40c4..d074428 100644 --- a/layouts/partials/serieslink.html +++ b/layouts/partials/serieslink.html @@ -3,13 +3,9 @@ {{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}