Move page config under paige.page

master
Will Faught 2 years ago
parent 1f7eca9b71
commit 2b05b8366d

@ -214,7 +214,6 @@ paige:
domain: "example.com" domain: "example.com"
yandex: # metrica.yandex.com yandex: # metrica.yandex.com
account_id: "123456" account_id: "123456"
authors_class: "text-center text-secondary" # Page authors class
bootstrap: bootstrap:
icons: icons:
link_href: "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" # Local or remote file link_href: "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" # Local or remote file
@ -246,9 +245,7 @@ paige:
account_id: "123456" account_id: "123456"
utterances: # utteranc.es utterances: # utteranc.es
github_repo: "example/foo" github_repo: "example/foo"
date_class: "text-center text-secondary" # Page date class
date_format: "2006 January 2" # Hugo date format for page dates date_format: "2006 January 2" # Hugo date format for page dates
description_class: "lead text-center" # Page description class
hide_theme_comment: true # Don't put a link to this project in a code comment hide_theme_comment: true # Don't put a link to this project in a code comment
hide_theme_link: true # Don't put a link to this project in the footer hide_theme_link: true # Don't put a link to this project in the footer
math: math:
@ -264,6 +261,11 @@ paige:
menu_breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items menu_breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items
menu_style: "pills" # Menu item style; must be "links" or "pills"; default is "pills" menu_style: "pills" # Menu item style; must be "links" or "pills"; default is "pills"
metadata_max_width: "100ch" # Page metadata max width metadata_max_width: "100ch" # Page metadata max width
page: # Every page
authors_class: "text-center text-secondary" # Page authors class
date_class: "text-center text-secondary" # Page date class
description_class: "lead text-center" # Page description class
title_class: "display-5 fw-bold text-center" # Page title class
pages: # Page lists in list and term default layouts pages: # Page lists in list and term default layouts
authors_class: "text-center text-secondary" # Page authors class attribute authors_class: "text-center text-secondary" # Page authors class attribute
date_class: "text-center text-secondary" # Page date class attribute date_class: "text-center text-secondary" # Page date class attribute
@ -283,7 +285,6 @@ paige:
icon: example-icon # Bootstrap icon name icon: example-icon # Bootstrap icon name
link: https://example.com/username link: https://example.com/username
name: Example Site # Used for screen readers name: Example Site # Used for screen readers
title_class: "display-5 fw-bold text-center" # Page title class
``` ```
If you set `hide_theme_comment` or `hide_theme_link`, please credit this project in a post to help others find it. If you set `hide_theme_comment` or `hide_theme_link`, please credit this project in a post to help others find it.
@ -298,12 +299,13 @@ authors: [
] ]
link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title
paige: paige:
authors_class: "text-center text-secondary" # Page authors class
content_class: "fst-italic" # Page content class
date_class: "text-center text-secondary" # Page date class
description_class: "h5 text-start" # Page description class
math: true # Enable math typesetting with KaTeX math: true # Enable math typesetting with KaTeX
title_class: "display-1 fw-medium text-start" # Page title class page:
authors_class: "text-center text-secondary" # Page authors class
content_class: "fst-italic" # Page content class
date_class: "text-center text-secondary" # Page date class
description_class: "lead text-center" # Page description class
title_class: "display-5 fw-bold text-center" # Page title class
toc: true # Show a table of contents if there are any headers toc: true # Show a table of contents if there are any headers
``` ```

@ -1,8 +1,8 @@
{{ $authors := partial "paige/func-authors.html" . }} {{ $authors := partial "paige/func-authors.html" . }}
{{ $authorsclass := .Param "paige.authors_class" | default "text-center text-secondary" }} {{ $authorsclass := .Param "paige.page.authors_class" | default "text-center text-secondary" }}
{{ $gap := "mb-0" }} {{ $gap := "mb-0" }}
{{ $date := .PublishDate }} {{ $date := .PublishDate }}
{{ $dateclass := .Param "paige.date_class" | default "text-center text-secondary" }} {{ $dateclass := .Param "paige.page.date_class" | default "text-center text-secondary" }}
{{ with $authors }} {{ with $authors }}
<p class="{{ if $date }} {{ $gap }} {{ end }} {{ $authorsclass }}">{{ . }}</p> <p class="{{ if $date }} {{ $gap }} {{ end }} {{ $authorsclass }}">{{ . }}</p>

@ -1,5 +1,5 @@
{{ if .Content }} {{ if .Content }}
{{ $class := $.Params.paige.content_class }} {{ $class := $.Params.paige.page.content_class }}
<section class="paige-content"> <section class="paige-content">
{{ with $class }} {{ with $class }}

@ -1,5 +1,5 @@
{{ with .Description }} {{ with .Description }}
{{ $class := $.Param "paige.description_class" | default "lead text-center" }} {{ $class := $.Param "paige.page.description_class" | default "lead text-center" }}
<p class="{{ $class }}">{{ . | markdownify }}</p> <p class="{{ $class }}">{{ . | markdownify }}</p>
{{ end }} {{ end }}

@ -1,5 +1,5 @@
{{ if .Title }} {{ if .Title }}
{{ $class := .Param "paige.title_class" | default "display-5 fw-bold text-center" }} {{ $class := .Param "paige.page.title_class" | default "display-5 fw-bold text-center" }}
{{ $title := .Title | markdownify }} {{ $title := .Title | markdownify }}
<h1 class="{{ $class }}">{{ if .Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if .Scratch.Get "paige_show_full_pages" }}<a aria-label="Link to this section" class="paige-header-link" href="{{ .RelPermalink }}">#</a>{{ end }}</h1> <h1 class="{{ $class }}">{{ if .Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if .Scratch.Get "paige_show_full_pages" }}<a aria-label="Link to this section" class="paige-header-link" href="{{ .RelPermalink }}">#</a>{{ end }}</h1>

Loading…
Cancel
Save