From 65af4ba1195abe303e426db169fc6165debed8e2 Mon Sep 17 00:00:00 2001 From: Dwayne Charrington Date: Fri, 20 Dec 2024 13:59:01 +1000 Subject: [PATCH] feat(layouts): enhance page title for author sections - Improved the logic for generating page titles in the head section, specifically for author pages. Now it conditionally displays "Authors | Site Title" or "Author Name | Site Title" based on the context, enhancing SEO and user experience. --- .../aurelia-theme/layouts/partials/head.html | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/themes/aurelia-theme/layouts/partials/head.html b/themes/aurelia-theme/layouts/partials/head.html index fa1de8b..fe07b03 100644 --- a/themes/aurelia-theme/layouts/partials/head.html +++ b/themes/aurelia-theme/layouts/partials/head.html @@ -3,7 +3,19 @@ -{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} + + {{- if .IsHome -}} + {{ site.Title }} + {{- else if eq .Type "authors" -}} + {{- if .IsSection -}} + Authors | {{ site.Title }} + {{- else -}} + {{ .Params.name }} | {{ site.Title }} + {{- end -}} + {{- else -}} + {{ printf "%s | %s" .Title site.Title }} + {{- end -}} + {{ if .IsNode }} @@ -28,7 +40,7 @@ - + @@ -38,7 +50,7 @@ - + {{ with .Params.image }}