From 200241401c3678cd64e3b12a7f08db8ce934a0d6 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Fri, 12 Jul 2024 22:31:40 -0700 Subject: [PATCH] Refactor keywords into var --- layouts/partials/paige/page-header.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/partials/paige/page-header.html b/layouts/partials/paige/page-header.html index 4b27dbdd..f7c42e3f 100644 --- a/layouts/partials/paige/page-header.html +++ b/layouts/partials/paige/page-header.html @@ -12,6 +12,8 @@ {{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }} {{ $title := $page.Title | markdownify }} +{{ $keywords := sort (append $categories $tags) "Title" }} +
{{ with $title }}

{{ if $link }}{{ . }}{{ else }}{{ . }}{{ end }}

@@ -21,11 +23,11 @@

{{ . }}

{{ end }} - {{ if or $authors $categories $date $readingtime $series $tags }} + {{ if or $authors $date $keywords $readingtime $series }}
- {{ if or $categories $tags }} + {{ with $keywords }}

- {{ range $i, $term := sort (append $categories $tags) "Title" -}} + {{ range $i, $term := . -}} {{- if $textkeywords -}} {{- if gt $i 0 }} ยท {{ end -}}