From 086118c7a2a59e10c2622caba6793680f117c134 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sat, 4 Feb 2023 17:08:02 -0800 Subject: [PATCH] Show all metadata by default --- README.md | 16 ++++++++-------- layouts/partials/paige/metadata.html | 6 +++--- layouts/partials/paige/pages.html | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 63ec47f5..76f017cb 100644 --- a/README.md +++ b/README.md @@ -266,7 +266,7 @@ paige: hide: false # Default is false categories: class: "badge text-bg-secondary text-decoration-none" # Default is "badge text-bg-secondary text-decoration-none" - show: false # Default is false + hide: false # Default is false content: class: "" # Default is "" hide: false # Default is false @@ -279,20 +279,20 @@ paige: hide: false # Default is false reading_time: class: "text-center text-secondary" # Default is "text-center text-secondary" - show: false # Default is false + hide: false # Default is false tags: class: "badge text-bg-secondary text-decoration-none" # Default is "badge text-bg-secondary text-decoration-none" - show: false # Default is false + hide: false # Default is false title: class: "display-5 fw-bold text-center" # Default is "display-5 fw-bold text-center" hide: false # Default is false page_list: authors: class: "text-center text-secondary" # Default is "text-center text-secondary" - show: false # Default is false + hide: false # Default is false categories: class: "badge text-bg-secondary text-decoration-none" # Default is "badge text-bg-secondary text-decoration-none" - show: false # Default is false + hide: false # Default is false date: class: "text-center text-secondary" # Default is "text-center text-secondary" format: ":date_long" # Default is ":date_long" @@ -305,13 +305,13 @@ paige: hide: false # Default is false reading_time: class: "text-center text-secondary" # Default is "text-center text-secondary" - show: false # Default is false + hide: false # Default is false summary: class: "text-center" # Default is "text-center" - show: false # Default is false + hide: false # Default is false tags: class: "badge text-bg-secondary text-decoration-none" # Default is "badge text-bg-secondary text-decoration-none" - show: false # Default is false + hide: false # Default is false title: class: "text-center" # Default is "text-center" hide: false # Default is false diff --git a/layouts/partials/paige/metadata.html b/layouts/partials/paige/metadata.html index bcd8249d..bcbd3523 100644 --- a/layouts/partials/paige/metadata.html +++ b/layouts/partials/paige/metadata.html @@ -2,17 +2,17 @@ {{ $authors := cond ($page.Param "paige.page.authors.hide" | not) (partial "paige/func-authors.html" $page) "" }} {{ $authorsclass := $page.Param "paige.page.authors.class" | default "text-center text-secondary" }} -{{ $categories := cond ($page.Param "paige.page.terms.show" | not) slice ($page.Params.categories | default slice) | sort | uniq }} +{{ $categories := cond ($page.Param "paige.page.terms.hide" | not) ($page.Params.categories | default slice) slice | sort | uniq }} {{ $date := cond ($page.Param "paige.page.date.hide" | not) $page.PublishDate "" }} {{ $dateclass := $page.Param "paige.page.date.class" | default "text-center text-secondary" }} {{ $dateformat := $page.Param "paige.page.date.format" | default ":date_long" }} {{ $description := cond ($page.Param "paige.page.description.hide" | not) ($page.Description | markdownify) "" }} {{ $descriptionclass := $page.Param "paige.page.description.class" | default "lead text-center" }} {{ $nogap := "mb-0" }} -{{ $readingtime := cond ($page.Param "paige.page.reading_time.show" | not) "" $page.ReadingTime }} +{{ $readingtime := cond ($page.Param "paige.page.reading_time.hide" | not) $page.ReadingTime "" }} {{ $readingtimeclass := $page.Param "paige.page.reading_time.class" | default "text-center text-secondary" }} {{ $sectionclass := "paige-metadata w-100" }} -{{ $tags := cond ($page.Param "paige.page.terms.show" | not) slice ($page.Params.tags | default slice) | sort | uniq }} +{{ $tags := cond ($page.Param "paige.page.terms.hide" | not) ($page.Params.tags | default slice) slice | sort | uniq }} {{ $termsinnerclass := $page.Param "paige.page.terms.inner_class" | default "badge text-bg-secondary text-decoration-none" }} {{ $termsouterclass := $page.Param "paige.page.terms.outer_class" | default "text-center" }} {{ $title := cond ($page.Param "paige.page.title.hide" | not) ($page.Title | markdownify) "" }} diff --git a/layouts/partials/paige/pages.html b/layouts/partials/paige/pages.html index 409bdcc5..9dfc2b52 100644 --- a/layouts/partials/paige/pages.html +++ b/layouts/partials/paige/pages.html @@ -26,10 +26,10 @@

{{ .Key }}

{{ end }} {{ range .Pages }} - {{ $authors := cond ($page.Param "paige.page_list.authors.show" | not) "" (partial "paige/func-authors.html" .) }} + {{ $authors := cond ($page.Param "paige.page_list.authors.hide" | not) (partial "paige/func-authors.html" .) "" }} {{ $authorsclass := $page.Param "paige.page_list.authors.class" | default (print $class " text-secondary") }} - {{ $categories := cond ($page.Param "paige.page_list.terms.show" | not) slice (.Params.categories | default slice) | sort | uniq }} - {{ $date := cond ($page.Param "paige.page_list.date.show" | not) "" .PublishDate }} + {{ $categories := cond ($page.Param "paige.page_list.terms.hide" | not) (.Params.categories | default slice) slice | sort | uniq }} + {{ $date := cond ($page.Param "paige.page_list.date.hide" | not) .PublishDate "" }} {{ $dateclass := $page.Param "paige.page_list.date.class" | default (print $class " text-secondary") }} {{ $dateformat := $page.Param "paige.page_list.date.format" | default ":date_long" }} {{ $description := cond ($page.Param "paige.page_list.description.hide" | not) (.Description | markdownify) "" }} @@ -39,12 +39,12 @@ {{ $flags := slice }} {{ $future := and .PublishDate (gt .PublishDate now) }} {{ $modified := and .PublishDate .Lastmod (lt .PublishDate .Lastmod) }} - {{ $readingtime := cond ($page.Param "paige.page_list.reading_time.show" | not) "" .ReadingTime }} + {{ $readingtime := cond ($page.Param "paige.page_list.reading_time.hide" | not) .ReadingTime "" }} {{ $readingtimeclass := $page.Param "paige.page_list.reading_time.class" | default (print $class " text-secondary") }} {{ $sectionclass := $page.Param "paige.page_list.section.class" | default "mb-3 w-100" }} - {{ $summary := cond ($page.Param "paige.page_list.summary.show" | not) "" (.Summary | strings.TrimPrefix "

" | strings.TrimSuffix "

") }} + {{ $summary := cond ($page.Param "paige.page_list.summary.hide" | not) (.Summary | strings.TrimPrefix "

" | strings.TrimSuffix "

" | htmlUnescape | plainify) "" }} {{ $summaryclass := $page.Param "paige.page_list.summary.class" | default $class }} - {{ $tags := cond ($page.Param "paige.page_list.terms.show" | not) slice (.Params.tags | default slice) | sort | uniq }} + {{ $tags := cond ($page.Param "paige.page_list.terms.hide" | not) (.Params.tags | default slice) slice | sort | uniq }} {{ $termsinnerclass := $page.Param "paige.page_list.terms.inner_class" | default "badge text-bg-secondary text-decoration-none" }} {{ $termsouterclass := $page.Param "paige.page_list.terms.outer_class" | default $class }} {{ $title := cond ($page.Param "paige.page_list.title.hide" | not) (.Title | markdownify) "" }}