Move paige.main.* params to paige
This commit is contained in:
65
README.md
65
README.md
@@ -287,41 +287,40 @@ paige:
|
||||
title:
|
||||
class: "mb-0 text-center"
|
||||
hide: false
|
||||
main:
|
||||
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: ""
|
||||
reading_time:
|
||||
class: "text-center text-secondary"
|
||||
hide: false
|
||||
section:
|
||||
class: "paige-metadata w-100"
|
||||
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:
|
||||
class: "border mb-3 pe-3 ps-3 pt-3 rounded"
|
||||
metadata:
|
||||
authors:
|
||||
class: "text-center text-secondary"
|
||||
hide: false
|
||||
max_width: ""
|
||||
content:
|
||||
class: "mw-100 paige-content"
|
||||
date:
|
||||
class: "text-center text-secondary"
|
||||
format: ":date_long" # Hugo date format
|
||||
hide: false
|
||||
max_width: ""
|
||||
description:
|
||||
class: "lead text-center"
|
||||
hide: false
|
||||
git:
|
||||
commit_url_prefix: "" # Example is "https://github.com/willfaught/paige/commit/"
|
||||
max_width: ""
|
||||
reading_time:
|
||||
class: "text-center text-secondary"
|
||||
hide: false
|
||||
section:
|
||||
class: "paige-metadata w-100"
|
||||
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:
|
||||
class: "border mb-3 pe-3 ps-3 pt-3 rounded"
|
||||
hide: false
|
||||
max_width: ""
|
||||
content:
|
||||
class: "mw-100 paige-content"
|
||||
hide: false
|
||||
max_width: ""
|
||||
math: false # Enable math typesetting
|
||||
rss:
|
||||
hide_page: false
|
||||
|
@@ -8,10 +8,10 @@
|
||||
{{ $listshowcontent = $params.listshowcontent }}
|
||||
{{ end }}
|
||||
|
||||
{{ $class := $page.Param "paige.main.content.class" | default "mw-100 paige-content" }}
|
||||
{{ $class := $page.Param "paige.content.class" | default "mw-100 paige-content" }}
|
||||
{{ $content := "" }}
|
||||
|
||||
{{ if $page.Param "paige.main.content.hide" | not }}
|
||||
{{ if $page.Param "paige.content.hide" | not }}
|
||||
{{ $content = cond ($listshowcontent | not) ($page.Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` (printf `${1}<a aria-label="%v" class="paige-header-link" href="#${2}">#</a>${3}` (i18n "paige_aria_section_link")) | safeHTML) $page.Content }}
|
||||
{{ end }}
|
||||
|
||||
|
@@ -8,29 +8,29 @@
|
||||
{{ $listshowcontent = $params.listshowcontent }}
|
||||
{{ end }}
|
||||
|
||||
{{ $authors := cond ($page.Param "paige.main.metadata.authors.hide" | not) (partial "paige/authors.html" $page) "" }}
|
||||
{{ $authorsclass := $page.Param "paige.main.metadata.authors.class" | default "paige-authors text-center text-secondary" }}
|
||||
{{ $categories := cond ($page.Param "paige.main.metadata.terms.hide" | not) ($page.Params.categories | default slice) slice | uniq }}
|
||||
{{ $authors := cond ($page.Param "paige.metadata.authors.hide" | not) (partial "paige/authors.html" $page) "" }}
|
||||
{{ $authorsclass := $page.Param "paige.metadata.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 }}
|
||||
{{ $commiturl := "" }}
|
||||
{{ $date := cond ($page.Param "paige.main.metadata.date.hide" | not) (cond (eq ($page.Param "paige.date" | default "published") "published") $page.PublishDate $page.Lastmod) "" }}
|
||||
{{ $dateclass := $page.Param "paige.main.metadata.date.class" | default "paige-date text-center text-secondary" }}
|
||||
{{ $dateformat := $page.Param "paige.main.metadata.date.format" | default ":date_long" }}
|
||||
{{ $description := cond ($page.Param "paige.main.metadata.description.hide" | not) ($page.Description | markdownify) "" }}
|
||||
{{ $descriptionclass := $page.Param "paige.main.metadata.description.class" | default "lead paige-description text-center" }}
|
||||
{{ $date := cond ($page.Param "paige.metadata.date.hide" | not) (cond (eq ($page.Param "paige.date" | default "published") "published") $page.PublishDate $page.Lastmod) "" }}
|
||||
{{ $dateclass := $page.Param "paige.metadata.date.class" | default "paige-date text-center text-secondary" }}
|
||||
{{ $dateformat := $page.Param "paige.metadata.date.format" | default ":date_long" }}
|
||||
{{ $description := cond ($page.Param "paige.metadata.description.hide" | not) ($page.Description | markdownify) "" }}
|
||||
{{ $descriptionclass := $page.Param "paige.metadata.description.class" | default "lead paige-description text-center" }}
|
||||
{{ $nogap := "mb-0" }}
|
||||
{{ $readingtime := cond ($page.Param "paige.main.metadata.reading_time.hide" | not) $page.ReadingTime "" }}
|
||||
{{ $readingtimeclass := $page.Param "paige.main.metadata.reading_time.class" | default "paige-reading-time text-center text-secondary" }}
|
||||
{{ $readingtime := cond ($page.Param "paige.metadata.reading_time.hide" | not) $page.ReadingTime "" }}
|
||||
{{ $readingtimeclass := $page.Param "paige.metadata.reading_time.class" | default "paige-reading-time text-center text-secondary" }}
|
||||
{{ $sectionclass := "paige-metadata w-100" }}
|
||||
{{ $tags := cond ($page.Param "paige.main.metadata.terms.hide" | not) ($page.Params.tags | default slice) slice | uniq }}
|
||||
{{ $termsinnerclass := $page.Param "paige.main.metadata.terms.inner_class" | default "badge paige-terms-inner text-bg-secondary text-decoration-none" }}
|
||||
{{ $termsouterclass := $page.Param "paige.main.metadata.terms.outer_class" | default "paige-terms-outer text-center" }}
|
||||
{{ $title := cond ($page.Param "paige.main.metadata.title.hide" | not) ($page.Title | markdownify) "" }}
|
||||
{{ $titleclass := $page.Param "paige.main.metadata.title.class" | default "display-5 fw-bold paige-title text-center" }}
|
||||
{{ $tags := cond ($page.Param "paige.metadata.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" }}
|
||||
{{ $termsouterclass := $page.Param "paige.metadata.terms.outer_class" | default "paige-terms-outer text-center" }}
|
||||
{{ $title := cond ($page.Param "paige.metadata.title.hide" | not) ($page.Title | markdownify) "" }}
|
||||
{{ $titleclass := $page.Param "paige.metadata.title.class" | default "display-5 fw-bold paige-title text-center" }}
|
||||
{{ $titlelink := $page.Params.link }}
|
||||
{{ $titlepage := $page.RelPermalink }}
|
||||
|
||||
{{ if and ($page.Param "paige.main.metadata.git.commit_url_prefix") $page.GitInfo }}
|
||||
{{ $commiturl = print ($page.Param "paige.main.metadata.git.commit_url_prefix") $page.GitInfo.Hash }}
|
||||
{{ if and ($page.Param "paige.metadata.git.commit_url_prefix") $page.GitInfo }}
|
||||
{{ $commiturl = print ($page.Param "paige.metadata.git.commit_url_prefix") $page.GitInfo.Hash }}
|
||||
{{ end }}
|
||||
|
||||
<section {{ with $sectionclass }} class="{{ . }}" {{ end }}>
|
||||
|
@@ -49,8 +49,8 @@
|
||||
{{ $titleclass := $page.Param "paige.list.title.class" | default "mb-0 paige-title text-center" }}
|
||||
{{ $titlelink := .RelPermalink }}
|
||||
|
||||
{{ if and ($page.Param "paige.main.metadata.git.commit_url_prefix") $page.GitInfo }}
|
||||
{{ $commiturl = print ($page.Param "paige.main.metadata.git.commit_url_prefix") $page.GitInfo.Hash }}
|
||||
{{ if and ($page.Param "paige.metadata.git.commit_url_prefix") $page.GitInfo }}
|
||||
{{ $commiturl = print ($page.Param "paige.metadata.git.commit_url_prefix") $page.GitInfo.Hash }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $draft }}
|
||||
|
@@ -35,19 +35,19 @@ body, html {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
{{ with $page.Param "paige.main.content.max_width" }}
|
||||
{{ with $page.Param "paige.content.max_width" }}
|
||||
.paige-content {
|
||||
max-width: {{ . }};
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
{{ with $page.Param "paige.main.table_of_contents.max_width" }}
|
||||
{{ with $page.Param "paige.table_of_contents.max_width" }}
|
||||
.paige-toc {
|
||||
max-width: {{ . }};
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
{{ with $page.Param "paige.main.metadata.max_width" }}
|
||||
{{ with $page.Param "paige.metadata.max_width" }}
|
||||
.paige-metadata {
|
||||
max-width: {{ . }};
|
||||
}
|
||||
|
@@ -8,9 +8,9 @@
|
||||
{{ $listshowcontent = $params.listshowcontent }}
|
||||
{{ end }}
|
||||
|
||||
{{ $class := $page.Param "paige.main.table_of_contents.class" | default "border mb-3 pe-3 ps-3 pt-3 rounded" }}
|
||||
{{ $class := $page.Param "paige.table_of_contents.class" | default "border mb-3 pe-3 ps-3 pt-3 rounded" }}
|
||||
|
||||
{{ if and $page.Content ($page.Param "paige.main.table_of_contents.hide" | not) (not $listshowcontent) (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
|
||||
{{ if and $page.Content ($page.Param "paige.table_of_contents.hide" | not) (not $listshowcontent) (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
|
||||
<section class="paige-toc">
|
||||
{{ with $class }}
|
||||
<div class="{{ . }}">
|
||||
|
Reference in New Issue
Block a user