diff --git a/README.md b/README.md index 54d98177..517f0cf9 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,7 @@ There is a single parameter object with sensible defaults that can be overridden color = "#0d6efd" # Bootstrap primary color and theme color for Safari and Windows color_scheme = "auto" # Must be "auto", "dark", or "light" external_link_new_tab = false # Open external links in new tabs +keyword_style = "text" # Must be "text" or "pills" math = false # Enable math typesetting site_title = "" # Appears above the menu, above the site description, if set site_description = "" # Appears above the menu, below the site title, if set diff --git a/layouts/partials/paige/metadata.html b/layouts/partials/paige/metadata.html index fa2635f1..97d0d848 100644 --- a/layouts/partials/paige/metadata.html +++ b/layouts/partials/paige/metadata.html @@ -10,6 +10,7 @@ {{ $readingtime := $page.ReadingTime }} {{ $series := $page.GetTerms "series" }} {{ $tags := $page.GetTerms "tags" }} +{{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }} {{ $title := $page.Title | markdownify }} {{ if and ($page.Param "paige.git.commit_url") $page.GitInfo }} @@ -28,11 +29,17 @@ {{ if or $authors $categories $date $readingtime $series $tags }}
{{ if or $categories $tags }} -

+

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

{{ end }} diff --git a/layouts/partials/paige/page.html b/layouts/partials/paige/page.html index 288f51b4..7ec6c215 100644 --- a/layouts/partials/paige/page.html +++ b/layouts/partials/paige/page.html @@ -16,6 +16,7 @@ {{ $series := $page.GetTerms "series" }} {{ $summary := $page.Summary | markdownify | plainify | htmlUnescape }} {{ $tags := $page.GetTerms "tags" }} +{{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }} {{ $title := $page.Title | markdownify | plainify | htmlUnescape }} {{ $titlelink := $page.RelPermalink }} @@ -62,9 +63,15 @@ {{ if or $categories $tags }}

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

{{ end }}