diff --git a/layouts/partials/head.html b/layouts/partials/head.html index d855306..43ef99e 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -8,7 +8,11 @@ {{- end }} {{- /* Title */}} -{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }} +{{- $pageTitle := site.Title }} +{{- if (and .Title (not .IsHome)) }} + {{- $pageTitle = printf "%s | %s" .Title $pageTitle }} +{{- end }} +{{ $pageTitle }} {{- /* Meta */}} {{- if .IsHome }} @@ -73,19 +77,17 @@ {{- /* https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started */}} {{- if .Params.cover.image }} - - - - - -{{- else -}} - {{- template "_internal/twitter_cards.html" . -}} {{- end -}} + + + + + -{{- template "partials/templates/opengraph.html" . }} +{{- template "partials/templates/opengraph.html" (dict "page" . "pageTitle" $pageTitle) }} -{{- template "partials/templates/schema_json.html" . }} +{{- template "partials/templates/schema_json.html" (dict "page" . "pageTitle" $pageTitle) }} {{- partial "extend_head.html" . }}