Move many paige.metadata.* params to paige

master
Will Faught 2 years ago
parent 42f8f041fd
commit 1b75976fc3

@ -249,11 +249,14 @@ paige:
hide: false # Don't credit this project in a data attribute hide: false # Don't credit this project in a data attribute
link: link:
hide: false # Don't credit this project in the footer hide: false # Don't credit this project in the footer
date: "published" # Page date displayed; must be "published" or "modified" date:
header: class: "text-center text-secondary"
menu: format: ":date_long" # Hugo date format
breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items hide: false
style: "pills" # Must be "links" or "pills" source: "published" # Displayed date; must be "published" or "modified"
menu:
breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items
style: "pills" # Must be "links" or "pills"
list: list:
authors: authors:
class: "mb-0 text-center text-secondary" class: "mb-0 text-center text-secondary"
@ -288,31 +291,27 @@ paige:
class: "mb-0 text-center" class: "mb-0 text-center"
hide: false hide: false
metadata: metadata:
authors:
class: "text-center text-secondary"
hide: false
date:
class: "text-center text-secondary"
format: ":date_long" # Hugo date format
hide: false
description:
class: "lead text-center"
hide: false
git:
commit_url_prefix: "" # Example is "https://github.com/willfaught/paige/commit/"
max_width: "" max_width: ""
reading_time:
class: "text-center text-secondary"
hide: false
section: section:
class: "paige-metadata w-100" class: "paige-metadata w-100"
terms: authors:
hide: false class: "text-center text-secondary"
inner_class: "badge text-bg-secondary text-decoration-none" hide: false
outer_class: "text-center" description:
title: class: "lead text-center"
class: "display-5 fw-bold text-center" hide: false
hide: false git:
commit_url_prefix: "" # Example is "https://github.com/willfaught/paige/commit/"
reading_time:
class: "text-center text-secondary"
hide: false
terms:
hide: false
inner_class: "badge text-bg-secondary text-decoration-none"
outer_class: "text-center"
title:
class: "display-5 fw-bold text-center"
hide: false
table_of_contents: table_of_contents:
class: "border mb-3 pe-3 ps-3 pt-3 rounded" class: "border mb-3 pe-3 ps-3 pt-3 rounded"
hide: false hide: false

@ -60,9 +60,15 @@ params:
will_faught: will_faught:
name: "Will Faught" name: "Will Faught"
paige: paige:
authors:
hide: true
credit: credit:
link: link:
hide: true hide: true
date:
hide: true
git:
commit_url_prefix: "https://github.com/willfaught/paige/commit/"
list: list:
authors: authors:
hide: true hide: true
@ -76,20 +82,12 @@ params:
hide: true hide: true
terms: terms:
hide: true hide: true
main: reading_time:
metadata: hide: true
authors: table_of_contents:
hide: true hide: true
date: terms:
hide: true hide: true
git:
commit_url_prefix: "https://github.com/willfaught/paige/commit/"
reading_time:
hide: true
terms:
hide: true
table_of_contents:
hide: true
social: social:
twitter: "username" twitter: "username"
theme: "paige" theme: "paige"

@ -8,12 +8,10 @@ paige:
image: image:
stretch: true stretch: true
url: landscape.webp url: landscape.webp
main: reading_time:
metadata: hide: true
reading_time: title:
hide: true class: display-1 fw-bold text-center
title:
class: display-1 fw-bold text-center
social: social:
github: github:
bootstrap_icon: github bootstrap_icon: github

@ -4,6 +4,10 @@ categories: ["configuration", "paige"]
date: "2022-02-23" date: "2022-02-23"
description: "Demonstration of the Paige configuration." description: "Demonstration of the Paige configuration."
paige: paige:
authors:
hide: false
date:
hide: false
list: list:
authors: authors:
hide: false hide: false
@ -17,18 +21,12 @@ paige:
hide: false hide: false
terms: terms:
hide: false hide: false
main: reading_time:
metadata: hide: false
authors: terms:
hide: false hide: false
date: table_of_contents:
hide: false hide: false
reading_time:
hide: false
terms:
hide: false
table_of_contents:
hide: false
tags: ["lists"] tags: ["lists"]
title: "Configuration" title: "Configuration"
--- ---

@ -4,20 +4,18 @@ categories: ["configuration", "paige"]
date: "2022-02-23" date: "2022-02-23"
description: "Demonstration of the Paige hide configuration." description: "Demonstration of the Paige hide configuration."
paige: paige:
main: authors:
metadata: hide: false
authors: date:
hide: false hide: false
date: git:
hide: false commit_url_prefix: "https://github.com/willfaught/paige/commit/"
git: reading_time:
commit_url_prefix: "https://github.com/willfaught/paige/commit/" hide: false
reading_time: table_of_contents:
hide: false hide: false
terms: terms:
hide: false hide: false
table_of_contents:
hide: false
tags: ["hide", "singles"] tags: ["hide", "singles"]
title: "Hide Configuration" title: "Hide Configuration"
weight: 10 weight: 10

@ -4,35 +4,33 @@ categories: ["configuration", "paige"]
date: "2022-02-23" date: "2022-02-23"
description: "Demonstration of the Paige style configuration." description: "Demonstration of the Paige style configuration."
paige: paige:
main: authors:
metadata: class: "fst-italic text-center text-secondary"
authors: hide: false
class: "fst-italic text-center text-secondary" content:
hide: false class: "fst-italic mw-100 paige-content"
date: hide: false
class: "fst-italic text-center text-secondary" date:
hide: false class: "fst-italic text-center text-secondary"
description: hide: false
class: "fst-italic lead text-center" description:
hide: false class: "fst-italic lead text-center"
git: hide: false
commit_url_prefix: "https://github.com/willfaught/paige/commit/" git:
reading_time: commit_url_prefix: "https://github.com/willfaught/paige/commit/"
class: "fst-italic text-center text-secondary" reading_time:
hide: false class: "fst-italic text-center text-secondary"
terms: hide: false
hide: false table_of_contents:
inner_class: "badge bg-secondary fst-italic text-decoration-none" class: "border fst-italic mb-3 pe-3 ps-3 pt-3 rounded"
outer_class: "text-center" hide: false
title: terms:
class: "display-5 fst-italic fw-bold text-center" hide: false
hide: false inner_class: "badge bg-secondary fst-italic text-decoration-none"
table_of_contents: outer_class: "text-center"
class: "border fst-italic mb-3 pe-3 ps-3 pt-3 rounded" title:
hide: false class: "display-5 fst-italic fw-bold text-center"
content: hide: false
class: "fst-italic mw-100 paige-content"
hide: false
tags: ["singles", "style"] tags: ["singles", "style"]
title: "Style Configuration" title: "Style Configuration"
weight: 20 weight: 20

@ -8,29 +8,29 @@
{{ $listshowcontent = $params.listshowcontent }} {{ $listshowcontent = $params.listshowcontent }}
{{ end }} {{ end }}
{{ $authors := cond ($page.Param "paige.metadata.authors.hide" | not) (partial "paige/authors.html" $page) "" }} {{ $authors := cond ($page.Param "paige.authors.hide" | not) (partial "paige/authors.html" $page) "" }}
{{ $authorsclass := $page.Param "paige.metadata.authors.class" | default "paige-authors text-center text-secondary" }} {{ $authorsclass := $page.Param "paige.authors.class" | default "paige-authors text-center text-secondary" }}
{{ $categories := cond ($page.Param "paige.metadata.terms.hide" | not) ($page.Params.categories | default slice) slice | uniq }} {{ $categories := cond ($page.Param "paige.terms.hide" | not) ($page.Params.categories | default slice) slice | uniq }}
{{ $commiturl := "" }} {{ $commiturl := "" }}
{{ $date := cond ($page.Param "paige.metadata.date.hide" | not) (cond (eq ($page.Param "paige.date" | default "published") "published") $page.PublishDate $page.Lastmod) "" }} {{ $date := cond ($page.Param "paige.date.hide" | not) (cond (eq ($page.Param "paige.date.source" | default "published") "published") $page.PublishDate $page.Lastmod) "" }}
{{ $dateclass := $page.Param "paige.metadata.date.class" | default "paige-date text-center text-secondary" }} {{ $dateclass := $page.Param "paige.date.class" | default "paige-date text-center text-secondary" }}
{{ $dateformat := $page.Param "paige.metadata.date.format" | default ":date_long" }} {{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }}
{{ $description := cond ($page.Param "paige.metadata.description.hide" | not) ($page.Description | markdownify) "" }} {{ $description := cond ($page.Param "paige.description.hide" | not) ($page.Description | markdownify) "" }}
{{ $descriptionclass := $page.Param "paige.metadata.description.class" | default "lead paige-description text-center" }} {{ $descriptionclass := $page.Param "paige.description.class" | default "lead paige-description text-center" }}
{{ $nogap := "mb-0" }} {{ $nogap := "mb-0" }}
{{ $readingtime := cond ($page.Param "paige.metadata.reading_time.hide" | not) $page.ReadingTime "" }} {{ $readingtime := cond ($page.Param "paige.reading_time.hide" | not) $page.ReadingTime "" }}
{{ $readingtimeclass := $page.Param "paige.metadata.reading_time.class" | default "paige-reading-time text-center text-secondary" }} {{ $readingtimeclass := $page.Param "paige.reading_time.class" | default "paige-reading-time text-center text-secondary" }}
{{ $sectionclass := "paige-metadata w-100" }} {{ $sectionclass := "paige-metadata w-100" }}
{{ $tags := cond ($page.Param "paige.metadata.terms.hide" | not) ($page.Params.tags | default slice) slice | uniq }} {{ $tags := cond ($page.Param "paige.terms.hide" | not) ($page.Params.tags | default slice) slice | uniq }}
{{ $termsinnerclass := $page.Param "paige.metadata.terms.inner_class" | default "badge paige-terms-inner text-bg-secondary text-decoration-none" }} {{ $termsinnerclass := $page.Param "paige.terms.inner_class" | default "badge paige-terms-inner text-bg-secondary text-decoration-none" }}
{{ $termsouterclass := $page.Param "paige.metadata.terms.outer_class" | default "paige-terms-outer text-center" }} {{ $termsouterclass := $page.Param "paige.terms.outer_class" | default "paige-terms-outer text-center" }}
{{ $title := cond ($page.Param "paige.metadata.title.hide" | not) ($page.Title | markdownify) "" }} {{ $title := cond ($page.Param "paige.title.hide" | not) ($page.Title | markdownify) "" }}
{{ $titleclass := $page.Param "paige.metadata.title.class" | default "display-5 fw-bold paige-title text-center" }} {{ $titleclass := $page.Param "paige.title.class" | default "display-5 fw-bold paige-title text-center" }}
{{ $titlelink := $page.Params.link }} {{ $titlelink := $page.Params.link }}
{{ $titlepage := $page.RelPermalink }} {{ $titlepage := $page.RelPermalink }}
{{ if and ($page.Param "paige.metadata.git.commit_url_prefix") $page.GitInfo }} {{ if and ($page.Param "paige.git.commit_url_prefix") $page.GitInfo }}
{{ $commiturl = print ($page.Param "paige.metadata.git.commit_url_prefix") $page.GitInfo.Hash }} {{ $commiturl = print ($page.Param "paige.git.commit_url_prefix") $page.GitInfo.Hash }}
{{ end }} {{ end }}
<section {{ with $sectionclass }} class="{{ . }}" {{ end }}> <section {{ with $sectionclass }} class="{{ . }}" {{ end }}>

@ -49,8 +49,8 @@
{{ $titleclass := $page.Param "paige.list.title.class" | default "mb-0 paige-title text-center" }} {{ $titleclass := $page.Param "paige.list.title.class" | default "mb-0 paige-title text-center" }}
{{ $titlelink := .RelPermalink }} {{ $titlelink := .RelPermalink }}
{{ if and ($page.Param "paige.metadata.git.commit_url_prefix") $page.GitInfo }} {{ if and ($page.Param "paige.git.commit_url_prefix") $page.GitInfo }}
{{ $commiturl = print ($page.Param "paige.metadata.git.commit_url_prefix") $page.GitInfo.Hash }} {{ $commiturl = print ($page.Param "paige.git.commit_url_prefix") $page.GitInfo.Hash }}
{{ end }} {{ end }}
{{ if $draft }} {{ if $draft }}

Loading…
Cancel
Save