Change feed, HTML titles to have breadcrumbs

This commit is contained in:
Will Faught
2023-09-24 21:57:22 -07:00
parent 8bd452dd7d
commit c11344d0be
3 changed files with 23 additions and 37 deletions

View File

@@ -1,21 +1,13 @@
{{ $page := . }}
{{ $pagetitle := $page.Title | markdownify | plainify }}
{{ $sitetitle := site.Title | markdownify | plainify }}
{{ $title := "" }}
{{ $titles := slice ($page.Title | markdownify | plainify) }}
{{ if and $pagetitle $sitetitle }}
{{ if $page.IsHome }}
{{ $title = $pagetitle }}
{{ else }}
{{ $title = printf "%s · %s" $pagetitle $sitetitle }}
{{ end }}
{{ else if $pagetitle }}
{{ $title = $pagetitle }}
{{ else if $sitetitle }}
{{ $title = $sitetitle }}
{{ range .Ancestors }}
{{ $titles = $titles | append (.Title | markdownify | plainify) }}
{{ end }}
{{ $title := delimit $titles " · " }}
<head>
{{ if templates.Exists "partials/paige/head-first.html" }}
{{ partial "paige/head-first.html" $page }}