From fbe0aec3eadf55f68fc9a0acf56945552ef2c485 Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Fri, 15 Sep 2023 07:28:11 +0100 Subject: [PATCH] Fix untitled tites --- content/LICENSE.md | 1 + layouts/_default/list.html | 2 +- layouts/partials/head.html | 15 +++++++-------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/content/LICENSE.md b/content/LICENSE.md index 7404596e..f3914097 100644 --- a/content/LICENSE.md +++ b/content/LICENSE.md @@ -1,4 +1,5 @@ --- +title: Site content licence type: timeless _build: list: never diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c147c733..6e600c2c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -22,7 +22,7 @@
  • {{ if .Params.emoji }}{{ .Params.emoji }}{{ end }} - {{ if .Title }}{{.Title}}{{ else }}Untitled post{{ end }} + {{ if .Title }}{{.Title}}{{ else }}Untitled {{ .Type | singularize -}}{{ end }} {{ if .Site.Params.dateformShort }} {{ .Date.Format .Site.Params.dateformShort }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 8a10f8cb..601e35ed 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -11,16 +11,15 @@ - -{{ block "title" . }} +{{ block "title" . -}} - {{ if .IsHome }} - {{ $.Site.Title }} - {{ else }} - {{if .Title }}{{ .Title }}{{ else }}Untitled post{{ end }}, {{ $.Site.Title }} - {{ end }} + {{- if .IsHome -}} + {{- $.Site.Title -}} + {{- else -}} + {{- if .Title -}}{{- .Title -}}{{- else -}}Untitled {{ $.Type | singularize -}}{{- end -}}, {{ $.Site.Title -}} + {{- end -}} -{{ end }} +{{- end }} {{/* */}}