Move many paige.metadata.* params to paige

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

@ -249,8 +249,11 @@ 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"
format: ":date_long" # Hugo date format
hide: false
source: "published" # Displayed date; must be "published" or "modified"
menu: menu:
breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items
style: "pills" # Must be "links" or "pills" style: "pills" # Must be "links" or "pills"
@ -288,24 +291,20 @@ paige:
class: "mb-0 text-center" class: "mb-0 text-center"
hide: false hide: false
metadata: metadata:
max_width: ""
section:
class: "paige-metadata w-100"
authors: authors:
class: "text-center text-secondary" class: "text-center text-secondary"
hide: false hide: false
date:
class: "text-center text-secondary"
format: ":date_long" # Hugo date format
hide: false
description: description:
class: "lead text-center" class: "lead text-center"
hide: false hide: false
git: git:
commit_url_prefix: "" # Example is "https://github.com/willfaught/paige/commit/" commit_url_prefix: "" # Example is "https://github.com/willfaught/paige/commit/"
max_width: ""
reading_time: reading_time:
class: "text-center text-secondary" class: "text-center text-secondary"
hide: false hide: false
section:
class: "paige-metadata w-100"
terms: terms:
hide: false hide: false
inner_class: "badge text-bg-secondary text-decoration-none" inner_class: "badge text-bg-secondary text-decoration-none"

@ -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:
metadata:
authors:
hide: true
date:
hide: true
git:
commit_url_prefix: "https://github.com/willfaught/paige/commit/"
reading_time: reading_time:
hide: true hide: true
terms:
hide: true
table_of_contents: table_of_contents:
hide: true hide: true
terms:
hide: true
social: social:
twitter: "username" twitter: "username"
theme: "paige" theme: "paige"

@ -8,8 +8,6 @@ paige:
image: image:
stretch: true stretch: true
url: landscape.webp url: landscape.webp
main:
metadata:
reading_time: reading_time:
hide: true hide: true
title: title:

@ -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,12 +21,6 @@ paige:
hide: false hide: false
terms: terms:
hide: false hide: false
main:
metadata:
authors:
hide: false
date:
hide: false
reading_time: reading_time:
hide: false hide: false
terms: terms:

@ -4,8 +4,6 @@ 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:
metadata:
authors: authors:
hide: false hide: false
date: date:
@ -14,10 +12,10 @@ paige:
commit_url_prefix: "https://github.com/willfaught/paige/commit/" commit_url_prefix: "https://github.com/willfaught/paige/commit/"
reading_time: reading_time:
hide: false hide: false
terms:
hide: false
table_of_contents: table_of_contents:
hide: false hide: false
terms:
hide: false
tags: ["hide", "singles"] tags: ["hide", "singles"]
title: "Hide Configuration" title: "Hide Configuration"
weight: 10 weight: 10

@ -4,11 +4,12 @@ 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:
metadata:
authors: authors:
class: "fst-italic text-center text-secondary" class: "fst-italic text-center text-secondary"
hide: false hide: false
content:
class: "fst-italic mw-100 paige-content"
hide: false
date: date:
class: "fst-italic text-center text-secondary" class: "fst-italic text-center text-secondary"
hide: false hide: false
@ -20,6 +21,9 @@ paige:
reading_time: reading_time:
class: "fst-italic text-center text-secondary" class: "fst-italic text-center text-secondary"
hide: false hide: false
table_of_contents:
class: "border fst-italic mb-3 pe-3 ps-3 pt-3 rounded"
hide: false
terms: terms:
hide: false hide: false
inner_class: "badge bg-secondary fst-italic text-decoration-none" inner_class: "badge bg-secondary fst-italic text-decoration-none"
@ -27,12 +31,6 @@ paige:
title: title:
class: "display-5 fst-italic fw-bold text-center" class: "display-5 fst-italic fw-bold text-center"
hide: false hide: false
table_of_contents:
class: "border fst-italic mb-3 pe-3 ps-3 pt-3 rounded"
hide: false
content:
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