diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 7272b21e6..35681dd3c 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,5 +1,5 @@ {{- define "title" -}} - {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}} + {{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) -}} {{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}} {{- end -}} @@ -8,8 +8,12 @@
{{- /* Title */ -}}

- {{- dict "Class" "fa-solid fa-feather fa-fw me-1" | partial "plugin/icon.html" -}} - {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} {{ .Pages.Len }} + {{- $titleIcon := "fa-solid fa-feather" -}} + {{- with .Params.titleIcon -}} + {{- $titleIcon = . -}} + {{- end -}} + {{- dict "Class" (add $titleIcon " fa-fw me-1") | partial "plugin/icon.html" -}} + {{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) }} {{ .Pages.Len }}

{{- /* Total word count */ -}} {{- /* See https://github.com/hugo-fixit/FixIt/issues/124 */ -}} diff --git a/layouts/posts/rss.xml b/layouts/posts/rss.xml index f974094fc..6cb9c129a 100644 --- a/layouts/posts/rss.xml +++ b/layouts/posts/rss.xml @@ -1,14 +1,14 @@ - {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}} + {{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) -}} {{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}} {{- .Permalink -}} - {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} | {{ .Site.Title -}} + {{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) }} | {{ .Site.Title -}} Hugo -- gohugo.io {{- with .Site.LanguageCode -}}