Use config to hide values

master
Will Faught 12 months ago
parent b17519532a
commit ada7e4c8c1

@ -178,6 +178,7 @@ color = "#0d6efd" # Bootstrap primary color and theme color for Safari and Windo
color_scheme = "auto" # Must be "auto", "dark", or "light" color_scheme = "auto" # Must be "auto", "dark", or "light"
credit = '<a class="link-secondary text-decoration-none" href="https://github.com/willfaught/paige">Paige Theme</a>' credit = '<a class="link-secondary text-decoration-none" href="https://github.com/willfaught/paige">Paige Theme</a>'
date_format = ":date_long" # Hugo date format date_format = ":date_long" # Hugo date format
description = "" # Site description. Appears above the menu, below the site title, if set.
external_link_new_tab = false # Open external links in new tabs external_link_new_tab = false # Open external links in new tabs
file_edit_url = "" # Example: "https://github.com/account/project/edit/master/content/%s" file_edit_url = "" # Example: "https://github.com/account/project/edit/master/content/%s"
file_history_url = "" # Example: "https://github.com/account/project/commits/master/content/%s" file_history_url = "" # Example: "https://github.com/account/project/commits/master/content/%s"
@ -185,8 +186,7 @@ keyword_style = "text" # Must be "text" or "pills"
license = "" # Example: "CC BY 4.0 License", "CC BY-NC 4.0 License", "MIT License" license = "" # Example: "CC BY 4.0 License", "CC BY-NC 4.0 License", "MIT License"
math = false # Enable math typesetting math = false # Enable math typesetting
menu_style = "links" # Must be "links", "pills", "tabs", or "underline" menu_style = "links" # Must be "links", "pills", "tabs", or "underline"
site_title = "" # Appears above the menu, above the site description, if set title = "" # Site title. Appears above the menu, above the site description, if set.
site_description = "" # Appears above the menu, below the site title, if set
style = "" # CSS included at the end of the stylesheet, before style-last.css style = "" # CSS included at the end of the stylesheet, before style-last.css
[paige.alert] [paige.alert]
@ -292,6 +292,43 @@ logo = "" # Example: "/logo.webp"
managing_editor = "" # Example: "example@example.com (John Doe)" managing_editor = "" # Example: "example@example.com (John Doe)"
web_master = "" # Example: "example@example.com (John Doe)" web_master = "" # Example: "example@example.com (John Doe)"
[params.paige.list_page]
hide_authors = false
hide_collections = false
hide_date = false
hide_description = false
hide_keywords = false
hide_pages = false
hide_reading_time = false
hide_sections = false
hide_series = false
hide_summary = false
hide_title = false
[params.paige.page]
hide_alert = false
hide_authors = false
hide_date = false
hide_description = false
hide_edit = false
hide_history = false
hide_keywords = false
hide_next = false
hide_prev = false
hide_reading_time = false
hide_series = false
hide_title = false
hide_toc = false
[params.paige.site]
hide_breadcrumbs = false
hide_copyright = false
hide_credit = false
hide_description = false
hide_license = false
hide_menu = false
hide_title = false
[paige.search] [paige.search]
hide_page = false hide_page = false
``` ```
@ -907,14 +944,16 @@ Body: None.
| ---------------------------------------------------------| -------------------------------------| | ---------------------------------------------------------| -------------------------------------|
| `yoursite/layouts/partials/paige/body-first.html` | The beginning of the body tag | | `yoursite/layouts/partials/paige/body-first.html` | The beginning of the body tag |
| `yoursite/layouts/partials/paige/body-last.html` | The end of the body tag | | `yoursite/layouts/partials/paige/body-last.html` | The end of the body tag |
| `yoursite/layouts/partials/paige/footer-first.html` | The beginning of the footer tag |
| `yoursite/layouts/partials/paige/footer-last.html` | The end of the footer tag |
| `yoursite/layouts/partials/paige/head-first.html` | The beginning of the head tag | | `yoursite/layouts/partials/paige/head-first.html` | The beginning of the head tag |
| `yoursite/layouts/partials/paige/head-last.html` | The end of the head tag | | `yoursite/layouts/partials/paige/head-last.html` | The end of the head tag |
| `yoursite/layouts/partials/paige/main-first.html` | The beginning of the main tag | | `yoursite/layouts/partials/paige/page-footer-first.html` | The beginning of the page footer tag |
| `yoursite/layouts/partials/paige/main-last.html` | The end of the main tag | | `yoursite/layouts/partials/paige/page-footer-last.html` | The end of the page footer tag |
| `yoursite/layouts/partials/paige/page-header-first.html` | The beginning of the page header tag | | `yoursite/layouts/partials/paige/page-header-first.html` | The beginning of the page header tag |
| `yoursite/layouts/partials/paige/page-header-last.html` | The end of the page header tag | | `yoursite/layouts/partials/paige/page-header-last.html` | The end of the page header tag |
| `yoursite/layouts/partials/paige/site-first.html` | The beginning of the main tag |
| `yoursite/layouts/partials/paige/site-last.html` | The end of the main tag |
| `yoursite/layouts/partials/paige/site-footer-first.html` | The beginning of the site footer tag |
| `yoursite/layouts/partials/paige/site-footer-last.html` | The end of the site footer tag |
| `yoursite/layouts/partials/paige/site-header-first.html` | The beginning of the site header tag | | `yoursite/layouts/partials/paige/site-header-first.html` | The beginning of the site header tag |
| `yoursite/layouts/partials/paige/site-header-last.html` | The end of the site header tag | | `yoursite/layouts/partials/paige/site-header-last.html` | The end of the site header tag |
| `yoursite/layouts/partials/paige/style-first.css` | The beginning of the style tag | | `yoursite/layouts/partials/paige/style-first.css` | The beginning of the style tag |
@ -986,81 +1025,79 @@ Page identifiers:
<dl> <dl>
<dt><code>#paige-alert</code></dt> <dt><code>#paige-alert</code></dt>
<dd>The page alert.</dd> <dd>The page alert.</dd>
<dt><code>#paige-article</code></dt>
<dd>The article.</dd>
<dt><code>#paige-authors</code></dt> <dt><code>#paige-authors</code></dt>
<dd>The authors.</dd> <dd>The page authors.</dd>
<dt><code>#paige-breadcrumbs</code></dt> <dt><code>#paige-breadcrumbs</code></dt>
<dd>The breadcrumbs.</dd> <dd>The site breadcrumbs.</dd>
<dt><code>#paige-collections</code></dt> <dt><code>#paige-collections</code></dt>
<dd>The collections.</dd> <dd>The site collection pages.</dd>
<dt><code>#paige-collections-header</code></dt> <dt><code>#paige-collections-header</code></dt>
<dd>The collections header.</dd> <dd>The site collection pages header.</dd>
<dt><code>#paige-comments</code></dt> <dt><code>#paige-comments</code></dt>
<dd>The comments.</dd> <dd>The page comments.</dd>
<dt><code>#paige-content</code></dt> <dt><code>#paige-content</code></dt>
<dd>The content.</dd> <dd>The page content.</dd>
<dt><code>#paige-copyright</code></dt> <dt><code>#paige-copyright</code></dt>
<dd>The copyright.</dd> <dd>The site copyright.</dd>
<dt><code>#paige-credit</code></dt> <dt><code>#paige-credit</code></dt>
<dd>The credit.</dd> <dd>The site credit.</dd>
<dt><code>#paige-date</code></dt> <dt><code>#paige-date</code></dt>
<dd>The date.</dd> <dd>The page date.</dd>
<dt><code>#paige-description</code></dt> <dt><code>#paige-edit</code></dt>
<dd>The description.</dd> <dd>The page edit link.</dd>
<dt><code>#paige-file</code></dt> <dt><code>#paige-file</code></dt>
<dd>The file links.</dd> <dd>The page edit and history links.</dd>
<dt><code>#paige-file-edit</code></dt> <dt><code>#paige-history</code></dt>
<dd>The file edit link.</dd> <dd>The page history link.</dd>
<dt><code>#paige-file-history</code></dt>
<dd>The file history link.</dd>
<dt><code>#paige-keywords</code></dt> <dt><code>#paige-keywords</code></dt>
<dd>The keywords.</dd> <dd>The page keywords.</dd>
<dt><code>#paige-license</code></dt> <dt><code>#paige-license</code></dt>
<dd>The license.</dd> <dd>The site license.</dd>
<dt><code>#paige-main</code></dt>
<dd>The main.</dd>
<dt><code>#paige-menu</code></dt> <dt><code>#paige-menu</code></dt>
<dd>The menu.</dd> <dd>The site menu.</dd>
<dt><code>#paige-metadata</code></dt> <dt><code>#paige-metadata</code></dt>
<dd>The metadata.</dd> <dd>The page metadata.</dd>
<dt><code>#paige-next</code></dt> <dt><code>#paige-next</code></dt>
<dd>The next page link.</dd> <dd>The next page link.</dd>
<dt><code>#paige-page-description</code></dt>
<dd>The page description.</dd>
<dt><code>#paige-page-footer</code></dt>
<dd>The page footer that contains the page edit, history, next, and previous links.</dd>
<dt><code>#paige-page-header</code></dt>
<dd>The page header that contains the page title, description, metadata, and table of contents.</dd>
<dt><code>#paige-page-title</code></dt>
<dd>The page title.</dd>
<dt><code>#paige-pages</code></dt> <dt><code>#paige-pages</code></dt>
<dd>The pages.</dd> <dd>The page sub-pages.</dd>
<dt><code>#paige-pages-header</code></dt> <dt><code>#paige-pages-header</code></dt>
<dd>The pages header.</dd> <dd>The page sub-pages header.</dd>
<dt><code>#paige-pagination</code></dt> <dt><code>#paige-pagination</code></dt>
<dd>The sub-page pagination links.</dd> <dd>The pagination of sub-pages.</dd>
<dt><code>#paige-prev</code></dt> <dt><code>#paige-prev</code></dt>
<dd>The previous page link.</dd> <dd>The previous page link.</dd>
<dt><code>#paige-prev-next</code></dt>
<dd>The container of the previous and next page links.</dd>
<dt><code>#paige-reading-time</code></dt> <dt><code>#paige-reading-time</code></dt>
<dd>The reading time.</dd> <dd>The page reading time.</dd>
<dt><code>#paige-root</code></dt>
<dd>The outermost element in the body.</dd>
<dt><code>#paige-sections</code></dt> <dt><code>#paige-sections</code></dt>
<dd>The sections.</dd> <dd>The page section sub-pages.</dd>
<dt><code>#paige-sections-header</code></dt> <dt><code>#paige-sections-header</code></dt>
<dd>The sections header.</dd> <dd>The page section sub-pages header.</dd>
<dt><code>#paige-series</code></dt> <dt><code>#paige-series</code></dt>
<dd>The series.</dd> <dd>The page series.</dd>
<dt><code>#paige-siblings</code></dt>
<dd>The page next and previous links.</dd>
<dt><code>#paige-site-description</code></dt> <dt><code>#paige-site-description</code></dt>
<dd>The site description.</dd> <dd>The site description.</dd>
<dt><code>#paige-site-footer</code></dt> <dt><code>#paige-site-footer</code></dt>
<dd>The container of the site copyright, license, and credit.</dd> <dd>The site footer that contains the site copyright, license, and credit.</dd>
<dt><code>#paige-site-header</code></dt> <dt><code>#paige-site-header</code></dt>
<dd>The site header that contains the site title, description, menu, and breadcrumbs.</dd> <dd>The site header that contains the site title, description, menu, and breadcrumbs.</dd>
<dt><code>#paige-site-title</code></dt> <dt><code>#paige-site-title</code></dt>
<dd>The site title.</dd> <dd>The site title.</dd>
<dt><code>#paige-title</code></dt>
<dd>The title.</dd>
<dt><code>#paige-toc</code></dt> <dt><code>#paige-toc</code></dt>
<dd>The table of contents.</dd> <dd>The table of contents.</dd>
</dl> </dl>
Page and sub-page classes: Sub-page field classes:
<dl> <dl>
<dt><code>.paige-authors</code></dt> <dt><code>.paige-authors</code></dt>
@ -1069,8 +1106,6 @@ Page and sub-page classes:
<dd>The date.</dd> <dd>The date.</dd>
<dt><code>.paige-description</code></dt> <dt><code>.paige-description</code></dt>
<dd>The description.</dd> <dd>The description.</dd>
<dt><code>.paige-keyword</code></dt>
<dd>A keyword.</dd>
<dt><code>.paige-keywords</code></dt> <dt><code>.paige-keywords</code></dt>
<dd>The keywords.</dd> <dd>The keywords.</dd>
<dt><code>.paige-metadata</code></dt> <dt><code>.paige-metadata</code></dt>
@ -1102,7 +1137,7 @@ Page kind classes:
<dd>The container element of pages with kind "term".</dd> <dd>The container element of pages with kind "term".</dd>
</dl> </dl>
Status classes: Page status classes:
<dl> <dl>
<dt><code>.paige-draft</code></dt> <dt><code>.paige-draft</code></dt>
@ -1146,24 +1181,26 @@ Shortcode classes:
By default, everything is shown. By default, everything is shown.
If you want a more minimal look, If you want a more minimal look,
try the following in `yoursite/layouts/partials/paige/style-first.css`: try the following in `yoursite/hugo.toml`:
```css ```toml
#paige-authors, [params.paige.list_page]
#paige-collections, hide_authors = true
#paige-keywords, hide_date = true
#paige-prev-next, hide_keywords = true
#paige-reading-time, hide_reading_time = true
#paige-series, hide_series = true
#paige-toc, hide_summary = true
.paige-authors,
.paige-date, [params.paige.page]
.paige-keywords, hide_authors = true
.paige-reading-time, hide_date = true
.paige-series, hide_keywords = true
.paige-summary { hide_next = true
display: none; hide_prev = true
} hide_reading_time = true
hide_series = true
hide_toc = true
``` ```
### Narrow look ### Narrow look

@ -1,19 +1,14 @@
+++ +++
title = "Paige" title = "Paige"
[paige] [paige.list_page]
style = """ hide_collections = true
#paige-collections, hide_pages = true
#paige-metadata, hide_sections = true
#paige-sections, [paige.page]
#paige-pages { hide_title = true
display: none;
}
"""
[paige.search]
hide_page = true
+++ +++
<p>{{% paige/image alt="Landscape" breakpoints=true class="object-fit-cover rounded-4 shadow-lg" fetchpriority="high" height="20rem" loading="eager" process="webp" src="https://images.unsplash.com/photo-1490604001847-b712b0c2f967?w=1296" width="100%" %}}</p> {{< paige/image alt="Landscape" breakpoints=true class="mt-3 object-fit-cover rounded-4 shadow-lg" fetchpriority="high" height="20rem" loading="eager" process="webp" src="https://images.unsplash.com/photo-1490604001847-b712b0c2f967?w=1296" width="100%" >}}
<h1 class="display-5 fw-bold mb-2 text-center">An advanced Hugo theme</h1> <h1 class="display-5 fw-bold mb-2 text-center">An advanced Hugo theme</h1>
@ -29,6 +24,6 @@ hide_page = true
<a href="https://github.com/willfaught/paige">Get started!</a> <a href="https://github.com/willfaught/paige">Get started!</a>
</p> </p>
<div class="column-gap-3 d-flex display-6 justify-content-center mb-3"> <div class="column-gap-3 d-flex display-6 justify-content-center">
{{< paige/icon class="bi bi-github" title="GitHub" url="https://github.com/willfaught/paige" >}} {{< paige/icon class="bi bi-github" title="GitHub" url="https://github.com/willfaught/paige" >}}
</div> </div>

@ -7,23 +7,29 @@ tags = ["sections"]
title = "Customizations" title = "Customizations"
[paige] [paige]
credit = "Paige Theme" credit = "Paige Theme"
style = """ file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
#paige-authors, file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
#paige-date, license = "MIT License"
#paige-file, [paige.list_page]
#paige-keywords, hide_authors = false
#paige-reading-time, hide_date = false
#paige-series, hide_keywords = false
#paige-toc, hide_reading_time = false
.paige-authors, hide_series = false
.paige-date, hide_summary = false
.paige-keywords, [paige.page]
.paige-reading-time, hide_authors = false
.paige-series, hide_date = false
.paige-summary { hide_keywords = false
display: block; hide_next = false
} hide_prev = false
""" hide_reading_time = false
hide_series = false
hide_toc = false
[paige.site]
hide_breadcrumbs = false
hide_credit = false
hide_license = false
+++ +++
This site hides some section page data by default. This page shows it all. This site hides some section page data by default. This page shows it all.
@ -34,25 +40,30 @@ This site hides some section page data by default. This page shows it all.
This page has the following parameters: This page has the following parameters:
```yaml ```toml
paige: [paige]
credit: "Paige Theme" credit = "Paige Theme"
file_link: file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
disable: false file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
style: | license = "MIT License"
#paige-authors, [paige.list_page]
#paige-date, hide_authors = false
#paige-file, hide_date = false
#paige-keywords, hide_keywords = false
#paige-reading-time, hide_reading_time = false
#paige-series, hide_series = false
#paige-toc, hide_summary = false
.paige-authors, [paige.page]
.paige-date, hide_authors = false
.paige-keywords, hide_date = false
.paige-reading-time, hide_keywords = false
.paige-series, hide_next = false
.paige-summary { hide_prev = false
display: block; hide_reading_time = false
} hide_series = false
hide_toc = false
[paige.site]
hide_breadcrumbs = false
hide_credit = false
hide_license = false
``` ```

@ -8,25 +8,29 @@ tags = ["show", "singles"]
title = "Show Data" title = "Show Data"
[paige] [paige]
credit = "Paige Theme" credit = "Paige Theme"
style = """ file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
#paige-authors, file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
#paige-breadcrumbs, license = "MIT License"
#paige-date, [paige.list_page]
#paige-file, hide_authors = false
#paige-keywords, hide_date = false
#paige-prev-next, hide_keywords = false
#paige-reading-time, hide_reading_time = false
#paige-series, hide_series = false
#paige-toc, hide_summary = false
.paige-authors, [paige.page]
.paige-date, hide_authors = false
.paige-keywords, hide_date = false
.paige-reading-time, hide_keywords = false
.paige-series, hide_next = false
.paige-summary { hide_prev = false
display: block; hide_reading_time = false
} hide_series = false
""" hide_toc = false
[paige.site]
hide_breadcrumbs = false
hide_credit = false
hide_license = false
+++ +++
This page shows some data that the rest of the site hides. This page shows some data that the rest of the site hides.
@ -37,27 +41,30 @@ This page shows some data that the rest of the site hides.
This page has the following parameters: This page has the following parameters:
```yaml ```toml
paige: [paige]
credit: "Paige Theme" credit = "Paige Theme"
file_link: file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
disable: false file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
style: | license = "MIT License"
#paige-authors, [paige.list_page]
#paige-breadcrumbs, hide_authors = false
#paige-date, hide_date = false
#paige-file, hide_keywords = false
#paige-keywords, hide_reading_time = false
#paige-prev-next, hide_series = false
#paige-reading-time, hide_summary = false
#paige-series, [paige.page]
#paige-toc, hide_authors = false
.paige-authors, hide_date = false
.paige-date, hide_keywords = false
.paige-keywords, hide_next = false
.paige-reading-time, hide_prev = false
.paige-series, hide_reading_time = false
.paige-summary { hide_series = false
display: block; hide_toc = false
} [paige.site]
hide_breadcrumbs = false
hide_credit = false
hide_license = false
``` ```

@ -8,40 +8,52 @@ tags = ["singles", "style"]
title = "Style Data" title = "Style Data"
[paige] [paige]
credit = "Paige Theme" credit = "Paige Theme"
file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
license = "MIT License"
style = """ style = """
#paige-authors, #paige-authors,
#paige-breadcrumbs,
#paige-content,
#paige-copyright,
#paige-credit,
#paige-date, #paige-date,
#paige-description,
#paige-file, #paige-file,
#paige-keywords, #paige-keywords,
#paige-prev-next, #paige-license,
#paige-menu,
#paige-page-title,
#paige-page-description,
#paige-reading-time, #paige-reading-time,
#paige-series, #paige-series,
#paige-toc, #paige-siblings,
.paige-authors, #paige-site-title,
.paige-date, #paige-site-description,
.paige-keywords, #paige-toc {
.paige-reading-time, font-style: italic;
.paige-series,
.paige-summary {
display: block;
} }
#paige-authors { font-style: italic; }
#paige-content { font-style: italic; }
#paige-date { font-style: italic; }
#paige-description { font-style: italic; }
#paige-file { font-style: italic; }
#paige-keywords { font-style: italic; }
#paige-reading-time { font-style: italic; }
#paige-series { font-style: italic; }
#paige-title { font-style: italic; }
#paige-toc { font-style: italic; }
#paige-copyright { font-style: italic; }
.paige-authors { font-style: italic; }
.paige-date { font-style: italic; }
.paige-keyword { font-style: italic; }
.paige-series { font-style: italic; }
.paige-summary { font-style: italic; }
""" """
[paige.list_page]
hide_authors = false
hide_date = false
hide_keywords = false
hide_reading_time = false
hide_series = false
hide_summary = false
[paige.page]
hide_authors = false
hide_date = false
hide_keywords = false
hide_next = false
hide_prev = false
hide_reading_time = false
hide_series = false
hide_toc = false
[paige.site]
hide_breadcrumbs = false
hide_credit = false
hide_license = false
+++ +++
This page styles some data differently than the rest of the site. This page styles some data differently than the rest of the site.
@ -52,42 +64,53 @@ This page styles some data differently than the rest of the site.
This page has the following parameters: This page has the following parameters:
```yaml ```toml
paige: [paige]
credit: "Paige Theme" credit = "Paige Theme"
file_link: file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s"
disable: false file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s"
style: | license = "MIT License"
#paige-authors, style = """
#paige-date, #paige-authors,
#paige-file, #paige-breadcrumbs,
#paige-keywords, #paige-content,
#paige-prev-next, #paige-copyright,
#paige-reading-time, #paige-credit,
#paige-series, #paige-date,
#paige-toc, #paige-description,
.paige-authors, #paige-file,
.paige-date, #paige-keywords,
.paige-keywords, #paige-license,
.paige-reading-time, #paige-menu,
.paige-series, #paige-page-title,
.paige-summary { #paige-page-description,
display: block; #paige-reading-time,
} #paige-series,
#paige-authors { font-style: italic; } #paige-siblings,
#paige-content { font-style: italic; } #paige-site-title,
#paige-date { font-style: italic; } #paige-site-description,
#paige-description { font-style: italic; } #paige-toc {
#paige-file { font-style: italic; } font-style: italic;
#paige-keywords { font-style: italic; } }
#paige-reading-time { font-style: italic; } """
#paige-series { font-style: italic; } [paige.list_page]
#paige-title { font-style: italic; } hide_authors = false
#paige-toc { font-style: italic; } hide_date = false
#paige-copyright { font-style: italic; } hide_keywords = false
.paige-authors { font-style: italic; } hide_reading_time = false
.paige-date { font-style: italic; } hide_series = false
.paige-keyword { font-style: italic; } hide_summary = false
.paige-series { font-style: italic; } [paige.page]
.paige-summary { font-style: italic; } hide_authors = false
hide_date = false
hide_keywords = false
hide_next = false
hide_prev = false
hide_reading_time = false
hide_series = false
hide_toc = false
[paige.site]
hide_breadcrumbs = false
hide_credit = false
hide_license = false
``` ```

@ -1,15 +1,20 @@
baseurl = "https://example.com" baseurl = "https://example.com"
copyright = "© Will Faught"
enablerobotstxt = true enablerobotstxt = true
languagecode = "en-us"
paginate = 50 paginate = 50
timezone = "America/Los_Angeles" timezone = "America/Los_Angeles"
titlecasestyle = "Go" titlecasestyle = "Go"
[languages.en] [languages.en]
title = "Paige" languagecode = "en-us"
languagedirection = "ltr"
languagename = "English"
weight = 10 weight = 10
[languages.en.params.paige]
copyright = "© Will Faught"
description = "Powerful, pliable pixel perfection"
title = "Paige"
[[languages.en.menu.main]] [[languages.en.menu.main]]
identifier = "home" identifier = "home"
name = "Home" name = "Home"
@ -90,12 +95,28 @@ section = ["html"]
taxonomy = ["html"] taxonomy = ["html"]
term = ["html"] term = ["html"]
[params.paige] [params.paige.list_page]
credit = "" hide_authors = true
file_edit_url = "https://github.com/willfaught/paige/edit/master/exampleSite/content/%s" hide_date = true
file_history_url = "https://github.com/willfaught/paige/commits/master/exampleSite/content/%s" hide_keywords = true
site_description = "Powerful, pliable pixel perfection" hide_reading_time = true
site_title = "Paige" hide_series = true
hide_summary = true
[params.paige.page]
hide_authors = true
hide_date = true
hide_keywords = true
hide_next = true
hide_prev = true
hide_reading_time = true
hide_series = true
hide_toc = true
[params.paige.site]
hide_breadcrumbs = true
hide_credit = true
hide_license = true
[[params.paige.feed.atom.authors]] [[params.paige.feed.atom.authors]]
email = "example@example.com" email = "example@example.com"

@ -1,17 +0,0 @@
#paige-authors,
#paige-breadcrumbs,
#paige-date,
#paige-file,
#paige-keywords,
#paige-prev-next,
#paige-reading-time,
#paige-series,
#paige-toc,
.paige-authors,
.paige-date,
.paige-keywords,
.paige-reading-time,
.paige-series,
.paige-summary {
display: none;
}

@ -8,22 +8,20 @@
{{ partial "paige/body-first.html" $page }} {{ partial "paige/body-first.html" $page }}
{{ end }} {{ end }}
<div class="container flex-fill" id="paige-root"> <div class="container">
<div class="row"> <div class="row">
<div class="col"> <div class="col mt-3" id="paige-site">
<main class="mt-3" id="paige-main"> {{ if templates.Exists "partials/paige/site-first.html" }}
{{ if templates.Exists "partials/paige/main-first.html" }} {{ partial "paige/site-first.html" $page }}
{{ partial "paige/main-first.html" $page }}
{{ end }} {{ end }}
{{ partial "paige/site-header.html" $page }} {{ partial "paige/site-header.html" $page }}
{{ block "main" $page }}{{ end }} {{ block "main" $page }}{{ end }}
{{ partial "paige/site-footer.html" $page }} {{ partial "paige/site-footer.html" $page }}
{{ if templates.Exists "partials/paige/main-last.html" }} {{ if templates.Exists "partials/paige/site-last.html" }}
{{ partial "paige/main-last.html" $page }} {{ partial "paige/site-last.html" $page }}
{{ end }} {{ end }}
</main>
</div> </div>
</div> </div>
</div> </div>

@ -1,21 +1,21 @@
{{ $page := . }} {{ $page := . }}
{{ $authors := partial "paige/authors.html" $page }} {{ $authors := partial "paige/authors.html" $page | and ($page.Parent.Param "paige.list_page.hide_authors" | not) }}
{{ $categories := $page.GetTerms "categories" }} {{ $categories := $page.GetTerms "categories" }}
{{ $date := $page.PublishDate }} {{ $date := $page.PublishDate | and ($page.Parent.Param "paige.list_page.hide_date" | not) }}
{{ $dateformat := $page.Param "paige.date_format" | default ":date_long" }} {{ $dateformat := $page.Parent.Param "paige.date_format" | default ":date_long" }}
{{ $description := $page.Description | markdownify | plainify | htmlUnescape }} {{ $description := $page.Description | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.list_page.hide_description" | not) }}
{{ $draft := $page.Draft }} {{ $draft := $page.Draft }}
{{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }} {{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }}
{{ $flags := slice }} {{ $flags := slice }}
{{ $future := and $page.PublishDate (gt $page.PublishDate now) }} {{ $future := and $page.PublishDate (gt $page.PublishDate now) }}
{{ $modified := and $page.PublishDate $page.Lastmod (lt $page.PublishDate $page.Lastmod) }} {{ $modified := and $page.PublishDate $page.Lastmod (lt $page.PublishDate $page.Lastmod) }}
{{ $readingtime := $page.ReadingTime }} {{ $readingtime := $page.ReadingTime | and ($page.Parent.Param "paige.list_page.hide_reading_time" | not) }}
{{ $series := $page.GetTerms "series" }} {{ $series := $page.GetTerms "series" | and ($page.Parent.Param "paige.list_page.hide_series" | not) }}
{{ $summary := $page.Summary | markdownify | plainify | htmlUnescape }} {{ $summary := $page.Summary | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.list_page.hide_summary" | not) }}
{{ $tags := $page.GetTerms "tags" }} {{ $tags := $page.GetTerms "tags" }}
{{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }} {{ $textkeywords := eq ($page.Parent.Param "paige.keyword_style" | default "text") "text" }}
{{ $title := $page.Title | markdownify | plainify | htmlUnescape }} {{ $title := $page.Title | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.list_page.hide_title" | not) }}
{{ $titlelink := $page.RelPermalink }} {{ $titlelink := $page.RelPermalink }}
{{ if $draft }} {{ if $draft }}
@ -38,25 +38,25 @@
{{ $flags = $flags | append "paige-published" }} {{ $flags = $flags | append "paige-published" }}
{{ end }} {{ end }}
{{ $flags = delimit ($flags | uniq) " " }} {{ $class := delimit (slice "paige-page" "w-100" | append $flags | uniq | sort) " " }}
{{ $class := delimit (slice "mb-3" "paige-page" "w-100" | append $flags | uniq | sort) " " }} {{ $keywords := sort (append $categories $tags) "Title" | and ($page.Parent.Param "paige.list_page.hide_keywords" | not) }}
<div class="{{ $class }}"> <div class="{{ $class }}">
{{ with $title }} {{ with $title }}
<p class="mb-0 paige-title text-center"><a href="{{ $titlelink }}">{{ . }}</a></p> <p class="paige-row-narrow paige-title text-center"><a href="{{ $titlelink }}">{{ . }}</a></p>
{{ end }} {{ end }}
{{ with $description }} {{ with $description }}
<p class="mb-0 paige-description text-center">{{ . }}</p> <p class="paige-description paige-row-narrow text-center">{{ . }}</p>
{{ end }} {{ end }}
{{ with $summary }} {{ with $summary }}
<p class="fst-italic mb-0 paige-summary text-center">{{ . }}</p> <p class="fst-italic paige-row-narrow paige-summary text-center">{{ . }}</p>
{{ end }} {{ end }}
{{ if or $categories $tags }} {{ with $keywords }}
<p class="mb-0 paige-keywords text-center text-secondary"> <p class="paige-keywords paige-row-narrow text-center text-secondary">
{{ range $i, $term := sort (append $categories $tags) "LinkTitle" -}} {{ range $i, $term := . -}}
{{- if $textkeywords -}} {{- if $textkeywords -}}
{{- if gt $i 0 }} · {{ end -}} {{- if gt $i 0 }} · {{ end -}}
@ -71,7 +71,7 @@
{{ end }} {{ end }}
{{ with $series }} {{ with $series }}
<p class="mb-0 paige-series text-center text-secondary"> <p class="paige-row-narrow paige-series text-center text-secondary">
{{ range $i, $series := . -}} {{ range $i, $series := . -}}
{{- if gt $i 0 }} · {{ end -}} {{- if gt $i 0 }} · {{ end -}}
@ -81,7 +81,7 @@
{{ end }} {{ end }}
{{ with $authors }} {{ with $authors }}
<p class="mb-0 paige-authors text-center text-secondary"> <p class="paige-authors text-center paige-row-narrow text-secondary">
{{ range $i, $author := . -}} {{ range $i, $author := . -}}
{{- if gt $i 0 }} · {{ end -}} {{- if gt $i 0 }} · {{ end -}}
@ -91,12 +91,12 @@
{{ end }} {{ end }}
{{ with $date }} {{ with $date }}
<p class="mb-0 paige-date text-center text-secondary"> <p class="paige-date text-center paige-row-narrow text-secondary">
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time> <time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time>
</p> </p>
{{ end }} {{ end }}
{{ with $readingtime }} {{ with $readingtime }}
<p class="mb-0 paige-reading-time text-center text-secondary">{{ . }} {{ i18n "paige_minutes" . }}</p> <p class="paige-reading-time paige-row-narrow text-center text-secondary">{{ . }} {{ i18n "paige_minutes" . }}</p>
{{ end }} {{ end }}
</div> </div>

@ -40,8 +40,8 @@
{{ end }} {{ end }}
{{ $collections := slice }} {{ $collections := slice }}
{{ $pages := $page.RegularPages }} {{ $pages := $page.RegularPages | and ($page.Param "paige.list_page.hide_pages" | not) }}
{{ $sections := $page.Sections }} {{ $sections := $page.Sections | and ($page.Param "paige.list_page.hide_sections" | not) }}
{{ if $page.IsHome }} {{ if $page.IsHome }}
{{ range $name, $taxonomy := site.Taxonomies }} {{ range $name, $taxonomy := site.Taxonomies }}
@ -51,6 +51,8 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ $collections = $collections | and ($page.Param "paige.list_page.hide_collections" | not) }}
{{ if and (not $pages) (in (slice "taxonomy" "term") $page.Kind) }} {{ if and (not $pages) (in (slice "taxonomy" "term") $page.Kind) }}
{{ $pages = $page.Pages }} {{ $pages = $page.Pages }}
{{ end }} {{ end }}

@ -1,59 +1,52 @@
{{ $page := . }} {{ $page := . }}
{{ $fileediturl := $page.Param "paige.file_edit_url" }} {{ $fileediturl := $page.Param "paige.file_edit_url" | and ($page.Param "paige.page.hide_edit" | not) }}
{{ $filehistoryurl := $page.Param "paige.file_history_url" }} {{ $filehistoryurl := $page.Param "paige.file_history_url" | and ($page.Param "paige.page.hide_history" | not) }}
{{ $file := false }}
{{ $first := templates.Exists "partials/paige/page-footer-first.html" }} {{ $first := templates.Exists "partials/paige/page-footer-first.html" }}
{{ $last := templates.Exists "partials/paige/page-footer-last.html" }} {{ $last := templates.Exists "partials/paige/page-footer-last.html" }}
{{ $next := $page.NextInSection }} {{ $next := $page.NextInSection | and ($page.Param "paige.page.hide_next" | not) }}
{{ $prev := $page.PrevInSection }} {{ $prev := $page.PrevInSection | and ($page.Param "paige.page.hide_prev" | not) }}
{{ if $page.File }} {{ if $page.File }}
{{ if $fileediturl }} {{ if $fileediturl }}
{{ $file = true }}
{{ $fileediturl = printf $fileediturl $page.File.Path }} {{ $fileediturl = printf $fileediturl $page.File.Path }}
{{ end }} {{ end }}
{{ if $filehistoryurl }} {{ if $filehistoryurl }}
{{ $file = true }}
{{ $filehistoryurl = printf $filehistoryurl $page.File.Path }} {{ $filehistoryurl = printf $filehistoryurl $page.File.Path }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if or $file $first $last $next $prev }} {{ if or $fileediturl $filehistoryurl $first $last $next $prev }}
<footer class="mt-3 mw-100 text-center text-secondary" id="paige-page-footer"> <footer class="mw-100" id="paige-page-footer">
{{ if $first }} {{ if $first }}
{{ partial "paige/page-footer-first.html" . }} {{ partial "paige/page-footer-first.html" . }}
{{ end }} {{ end }}
{{ if $file }} {{ if or $fileediturl $filehistoryurl }}
<div class="mb-3" id="paige-file"> <div id="paige-file">
{{ if $fileediturl }} {{ if $fileediturl }}
<p class="mb-0" id="paige-file-edit"> <div class="paige-row-narrow text-center text-secondary" id="paige-edit">
<a class="link-secondary" href="{{ $fileediturl | safeURL }}">{{ i18n "paige_edit_this_page" }}</a> <a class="link-secondary" href="{{ $fileediturl | safeURL }}">{{ i18n "paige_edit_this_page" }}</a>
</p> </div>
{{ end }} {{ end }}
{{ if $filehistoryurl }} {{ if $filehistoryurl }}
<p class="mb-0" id="paige-file-history"> <div class="paige-row-narrow text-center text-secondary" id="paige-history">
<a class="link-secondary" href="{{ $filehistoryurl | safeURL }}">{{ i18n "paige_edit_history" }}</a> <a class="link-secondary" href="{{ $filehistoryurl | safeURL }}">{{ i18n "paige_edit_history" }}</a>
</p> </div>
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}
{{ if or $next $prev }} {{ if or $next $prev }}
<div id="paige-prev-next"> <div id="paige-siblings">
{{ with $prev }} {{ with $prev }}
<p class="mb-0" id="paige-next"> <div class="paige-row-narrow text-center text-secondary" id="paige-next"><a class="link-secondary" href="{{ .Permalink }}">{{ .Title }}</a> &rsaquo;</div>
<a class="link-secondary" href="{{ .Permalink }}">{{ .Title }}</a> &rsaquo;
</p>
{{ end }} {{ end }}
{{ with $next }} {{ with $next }}
<p class="mb-0" id="paige-prev"> <div class="paige-row-narrow text-center text-secondary" id="paige-prev">&lsaquo; <a class="link-secondary" href="{{ .Permalink }}">{{ .Title }}</a></div>
&lsaquo; <a class="link-secondary" href="{{ .Permalink }}">{{ .Title }}</a>
</p>
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}

@ -1,41 +1,42 @@
{{ $page := . }} {{ $page := . }}
{{ $alert := $page.Param "paige.alert" }} {{ $alert := $page.Param "paige.alert" | and ($page.Param "paige.page.hide_alert" | not) }}
{{ $authors := partial "paige/authors.html" $page }} {{ $authors := partial "paige/authors.html" $page | and ($page.Param "paige.page.hide_authors" | not) }}
{{ $categories := $page.GetTerms "categories" }} {{ $categories := $page.GetTerms "categories" }}
{{ $date := and $page.IsPage $page.PublishDate }} {{ $date := and $page.IsPage $page.PublishDate | and ($page.Param "paige.page.hide_date" | not) }}
{{ $dateformat := $page.Param "paige.date_format" | default ":date_long" }} {{ $dateformat := $page.Param "paige.date_format" | default ":date_long" }}
{{ $description := $page.Description | markdownify }} {{ $description := $page.Description | markdownify | and ($page.Param "paige.page.hide_description" | not) }}
{{ $first := templates.Exists "partials/paige/page-header-first.html" }} {{ $first := templates.Exists "partials/paige/page-header-first.html" }}
{{ $last := templates.Exists "partials/paige/page-header-last.html" }} {{ $last := templates.Exists "partials/paige/page-header-last.html" }}
{{ $link := $page.Params.link }} {{ $link := $page.Params.link }}
{{ $readingtime := $page.ReadingTime }} {{ $readingtime := $page.ReadingTime | and ($page.Param "paige.page.hide_reading_time" | not) }}
{{ $series := $page.GetTerms "series" }} {{ $series := $page.GetTerms "series" | and ($page.Param "paige.page.hide_series" | not) }}
{{ $table := and $page.Content (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
{{ $tags := $page.GetTerms "tags" }} {{ $tags := $page.GetTerms "tags" }}
{{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }} {{ $textkeywords := eq ($page.Param "paige.keyword_style" | default "text") "text" }}
{{ $title := $page.Title | markdownify }} {{ $title := $page.Title | markdownify | and ($page.Param "paige.page.hide_title" | not) }}
{{ $toc := and $page.Content (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) | and ($page.Param "paige.page.hide_toc" | not) }}
{{ $keywords := sort (append $categories $tags) "Title" }} {{ $keywords := sort (append $categories $tags) "Title" | and ($page.Param "paige.page.hide_keywords" | not) }}
{{ if or $authors $date $description $first $keywords $last $readingtime $series $table $title }} {{ if or $authors $date $description $first $keywords $last $readingtime $series $title $toc }}
<header class="align-items-center d-flex flex-column mw-100" id="paige-page-header"> <header class="mw-100" id="paige-page-header">
<div class="align-items-center d-flex flex-column">
{{ if $first }} {{ if $first }}
{{ partial "paige/page-header-first.html" . }} {{ partial "paige/page-header-first.html" . }}
{{ end }} {{ end }}
{{ with $title }} {{ with $title }}
<h1 class="fw-bold text-center" id="paige-title">{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1> <h1 class="fw-bold" id="paige-page-title">{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1>
{{ end }} {{ end }}
{{ with $description }} {{ with $description }}
<p class="lead text-center" id="paige-description">{{ . }}</p> <p class="lead paige-row-wide" id="paige-page-description">{{ . }}</p>
{{ end }} {{ end }}
{{ if or $authors $date $keywords $readingtime $series }} {{ if or $authors $date $keywords $readingtime $series }}
<div class="my-3"> <div id="paige-metadata">
{{ with $keywords }} {{ with $keywords }}
<p class="{{ if $textkeywords }} mb-0 {{ end }} text-center {{ if $textkeywords }} text-secondary {{ end }}" id="paige-keywords"> <p class="{{ if $textkeywords }} paige-row-narrow {{ end }} text-center {{ if $textkeywords }} text-secondary {{ end }}" id="paige-keywords">
{{ range $i, $term := . -}} {{ range $i, $term := . -}}
{{- if $textkeywords -}} {{- if $textkeywords -}}
{{- if gt $i 0 }} · {{ end -}} {{- if gt $i 0 }} · {{ end -}}
@ -44,14 +45,14 @@
{{- else -}} {{- else -}}
{{- if gt $i 0 }} {{ end -}} {{- if gt $i 0 }} {{ end -}}
<a class="badge paige-keyword text-bg-secondary text-decoration-none" href="{{ .RelPermalink | safeURL }}">{{ .Title }}</a> <a class="badge text-bg-secondary text-decoration-none" href="{{ .RelPermalink | safeURL }}">{{ .Title }}</a>
{{- end -}} {{- end -}}
{{- end }} {{- end }}
</p> </p>
{{ end }} {{ end }}
{{ with $series }} {{ with $series }}
<p class="mb-0 text-center text-secondary" id="paige-series"> <p class="paige-row-narrow text-center text-secondary" id="paige-series">
{{ range $i, $series := . -}} {{ range $i, $series := . -}}
{{- if gt $i 0 }} · {{ end -}} {{- if gt $i 0 }} · {{ end -}}
@ -61,7 +62,7 @@
{{ end }} {{ end }}
{{ with $authors }} {{ with $authors }}
<p class="mb-0 text-center text-secondary" id="paige-authors"> <p class="paige-row-narrow text-center text-secondary" id="paige-authors">
{{ range $i, $author := . -}} {{ range $i, $author := . -}}
{{- if gt $i 0 }} · {{ end -}} {{- if gt $i 0 }} · {{ end -}}
@ -71,24 +72,24 @@
{{ end }} {{ end }}
{{ with $date }} {{ with $date }}
<p class="mb-0 text-center text-secondary" id="paige-date"> <p class="paige-row-narrow text-center text-secondary" id="paige-date">
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time> <time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time>
</p> </p>
{{ end }} {{ end }}
{{ with $readingtime }} {{ with $readingtime }}
<p class="mb-0 text-center text-secondary" id="paige-reading-time">{{ . }} {{ i18n "paige_minutes" . }}</p> <p class="paige-row-narrow text-center text-secondary" id="paige-reading-time">{{ . }} {{ i18n "paige_minutes" . }}</p>
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}
{{ with $alert }} {{ with $alert }}
<div class="alert alert-{{ .type }} my-3" id="paige-alert" role="alert">{{ .message | markdownify }}</div> <div class="alert alert-{{ .type }} paige-row-wide" id="paige-alert" role="alert">{{ .message | markdownify }}</div>
{{ end }} {{ end }}
{{ if $table }} {{ if $toc }}
<div class="my-3" id="paige-toc"> <div class="paige-row-wide" id="paige-toc">
<div class="border mb-3 pe-3 ps-3 pt-3 rounded"> <div class="border pe-3 ps-3 pt-3 rounded">
{{ $page.TableOfContents }} {{ $page.TableOfContents }}
</div> </div>
</div> </div>
@ -97,5 +98,6 @@
{{ if $last }} {{ if $last }}
{{ partial "paige/page-header-last.html" . }} {{ partial "paige/page-header-last.html" . }}
{{ end }} {{ end }}
</div>
</header> </header>
{{ end }} {{ end }}

@ -1,6 +1,6 @@
{{ $page := . }} {{ $page := . }}
{{ $class := slice "align-items-center" "d-flex" "flex-column" "my-3" }} {{ $class := slice }}
{{ $content := $page.Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` (printf `${1}<a aria-label="%s" class="paige-header-link" href="#${2}"></a>${3}` (i18n "paige_aria_section_link")) }} {{ $content := $page.Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` (printf `${1}<a aria-label="%s" class="paige-header-link" href="#${2}"></a>${3}` (i18n "paige_aria_section_link")) }}
{{ $draft := $page.Draft }} {{ $draft := $page.Draft }}
{{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }} {{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }}
@ -43,12 +43,14 @@
{{ $class = delimit ($class | uniq | sort) " " }} {{ $class = delimit ($class | uniq | sort) " " }}
<article class="{{ $class }}" id="paige-article"> <article class="{{ $class }}" id="paige-page">
<div class="align-items-center d-flex flex-column">
{{ partial "paige/page-header.html" $page }} {{ partial "paige/page-header.html" $page }}
{{ with $content }} {{ with $content }}
<div class="mw-100" id="paige-content">{{ . | safeHTML }}</div> <main class="mw-100" id="paige-content">{{ . | safeHTML }}</main>
{{ end }} {{ end }}
{{ partial "paige/page-footer.html" $page }} {{ partial "paige/page-footer.html" $page }}
</div>
</article> </article>

@ -1,36 +1,38 @@
{{ $page := . }} {{ $page := . }}
{{ $copyright := site.Copyright | markdownify }} {{ $copyright := $page.Param "paige.copyright" | default site.Copyright | markdownify | and ($page.Param "paige.site.hide_copyright" | not) }}
{{ $credit := $page.Param "paige.credit" }} {{ $credit := $page.Param "paige.credit" }}
{{ $first := templates.Exists "partials/paige/footer-first.html" }} {{ $first := templates.Exists "partials/paige/footer-first.html" }}
{{ $last := templates.Exists "partials/paige/footer-last.html" }} {{ $last := templates.Exists "partials/paige/footer-last.html" }}
{{ $license := $page.Param "paige.license" | markdownify | and ($page.Param "paige.site.hide_license" | not) }}
{{ $theme := "https://github.com/willfaught/paige" }} {{ $theme := "https://github.com/willfaught/paige" }}
{{ $license := $page.Param "paige.license" | markdownify }}
{{ $target := partial "paige/target.html" (dict "page" $page "url" $theme) }} {{ $target := partial "paige/target.html" (dict "page" $page "url" $theme) }}
{{ if eq $credit nil }} {{ if eq $credit nil }}
{{ $credit = `<a class="link-secondary text-decoration-none" href="https://github.com/willfaught/paige">Paige Theme</a>` | markdownify }} {{ $credit = `<a class="link-secondary text-decoration-none" href="{{ $theme }}" {{ with $target }} target="{{ . }}" {{ end }}>Paige Theme</a>` | markdownify }}
{{ else }} {{ else }}
{{ $credit = markdownify $credit }} {{ $credit = markdownify $credit }}
{{ end }} {{ end }}
{{ $credit = $credit | and ($page.Param "paige.site.hide_credit" | not) }}
{{ if or $copyright $credit $first $last $license }} {{ if or $copyright $credit $first $last $license }}
<footer class="my-3" id="paige-site-footer"> <footer id="paige-site-footer">
{{ if $first }} {{ if $first }}
{{ partial "paige/footer-first.html" . }} {{ partial "paige/footer-first.html" . }}
{{ end }} {{ end }}
{{ with $copyright }} {{ with $copyright }}
<p class="mb-0 text-center text-secondary" id="paige-copyright">{{ . }}</p> <p class="paige-row-narrow text-center text-secondary" id="paige-copyright">{{ . }}</p>
{{ end }} {{ end }}
{{ with $license }} {{ with $license }}
<p class="mb-0 text-center text-secondary" id="paige-license">{{ . }}</p> <p class="paige-row-narrow text-center text-secondary" id="paige-license">{{ . }}</p>
{{ end }} {{ end }}
{{ with $credit }} {{ with $credit }}
<p class="mb-0 text-center text-secondary" id="paige-credit">{{ . }}</p> <p class="paige-row-narrow text-center text-secondary" id="paige-credit">{{ . }}</p>
{{ end }} {{ end }}
{{ if $last }} {{ if $last }}

@ -1,15 +1,15 @@
{{ $page := . }} {{ $page := . }}
{{ $ancestors := $page.Ancestors }}
{{ $basepath := path.Clean (urls.Parse (relLangURL "")).Path }} {{ $basepath := path.Clean (urls.Parse (relLangURL "")).Path }}
{{ $description := $page.Param "paige.site_description" | markdownify }} {{ $breadcrumbs := $page.Ancestors | and ($page.Param "paige.site.hide_breadcrumbs" | not) }}
{{ $description := $page.Param "paige.description" | markdownify | and ($page.Param "paige.site.hide_description" | not) }}
{{ $first := templates.Exists "partials/paige/site-header-first.html" }} {{ $first := templates.Exists "partials/paige/site-header-first.html" }}
{{ $last := templates.Exists "partials/paige/site-header-last.html" }} {{ $last := templates.Exists "partials/paige/site-header-last.html" }}
{{ $links := false }} {{ $links := false }}
{{ $menu := site.Menus.main }} {{ $menu := site.Menus.main | and ($page.Param "paige.site.hide_menu" | not) }}
{{ $pills := false }} {{ $pills := false }}
{{ $tabs := false }} {{ $tabs := false }}
{{ $title := $page.Param "paige.site_title" | markdownify }} {{ $title := $page.Param "paige.title" | default site.Title | markdownify | and ($page.Param "paige.site.hide_title" | not) }}
{{ $underline := false }} {{ $underline := false }}
{{ if eq $basepath "/" }} {{ if eq $basepath "/" }}
@ -32,22 +32,22 @@
{{ $links = true }} {{ $links = true }}
{{ end }} {{ end }}
{{ if or $ancestors $description $first $last $menu $title }} {{ if or $breadcrumbs $description $first $last $menu $title }}
<header class="my-3" id="paige-site-header"> <header id="paige-site-header">
{{ if $first }} {{ if $first }}
{{ partial "paige/site-header-first.html" $page }} {{ partial "paige/site-header-first.html" $page }}
{{ end }} {{ end }}
{{ with $title }} {{ with $title }}
<p class="display-1 fw-bold mb-2 mt-3 text-center" id="paige-site-title">{{ . }}</p> <div class="display-1 fw-bold {{ if $description }} mb-2 {{ end }} paige-row-wide text-center" id="paige-site-title">{{ . }}</div>
{{ end }} {{ end }}
{{ with $description }} {{ with $description }}
<p class="lead mb-3 mt-2 text-center" id="paige-site-description">{{ . }}</p> <div class="lead paige-row-wide text-center" id="paige-site-description">{{ . }}</div>
{{ end }} {{ end }}
{{ with $menu }} {{ with $menu }}
<nav aria-label="{{ i18n `paige_menu` }}" class="my-3" id="paige-menu"> <nav aria-label="{{ i18n `paige_menu` }}" class="paige-row-wide" id="paige-menu">
<ul class="align-items-center justify-content-center nav {{ if $pills }} nav-pills {{ else if $tabs }} nav-tabs {{ else if $underline }} nav-underline {{ end }}"> <ul class="align-items-center justify-content-center nav {{ if $pills }} nav-pills {{ else if $tabs }} nav-tabs {{ else if $underline }} nav-underline {{ end }}">
{{ range . }} {{ range . }}
{{ $menupath := strings.TrimPrefix $basepath .URL }} {{ $menupath := strings.TrimPrefix $basepath .URL }}
@ -86,8 +86,8 @@
</nav> </nav>
{{ end }} {{ end }}
{{ with $ancestors }} {{ with $breadcrumbs }}
<nav aria-label="{{ i18n `paige_breadcrumbs` }}" class="my-3" id="paige-breadcrumbs"> <nav aria-label="{{ i18n `paige_breadcrumbs` }}" class="paige-row-wide" id="paige-breadcrumbs">
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
<ol class="breadcrumb mb-0"> <ol class="breadcrumb mb-0">
{{ $reverse := .Reverse }} {{ $reverse := .Reverse }}
@ -98,7 +98,7 @@
{{ $title := $ancestor.Title }} {{ $title := $ancestor.Title }}
{{ if and (eq $i $last) (not $title) }} {{ if and (eq $i $last) (not $title) }}
{{ $title = $page.Param "paige.site_title" | default (site.Title) }} {{ $title = $page.Param "paige.title" | default (site.Title) }}
{{ end }} {{ end }}
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ $title | markdownify | plainify | htmlUnescape }}</a></li> <li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ $title | markdownify | plainify | htmlUnescape }}</a></li>

@ -39,14 +39,6 @@
padding: 0; padding: 0;
} }
#paige-content > * {
margin-bottom: 1rem;
}
#paige-content > :last-child {
margin-bottom: 0;
}
blockquote { blockquote {
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
border-left: 0.25rem solid var(--bs-border-color); border-left: 0.25rem solid var(--bs-border-color);
@ -63,6 +55,7 @@ th {
display: flex; display: flex;
} }
.paige-row-narrow:not(:last-child),
.paige-figure .paige-quote, .paige-figure .paige-quote,
.paige-figure .paige-video, .paige-figure .paige-video,
.paige-figure .highlight pre.chroma, .paige-figure .highlight pre.chroma,
@ -79,7 +72,10 @@ blockquote > p:last-of-type {
.paige-gallery, .paige-gallery,
.paige-image, .paige-image,
.paige-quote, .paige-quote,
.paige-row-narrow:last-child,
.paige-row-wide,
.paige-video, .paige-video,
#paige-content > *,
table { table {
margin-bottom: 1rem; margin-bottom: 1rem;
} }

@ -1 +1 @@
<body class="d-flex flex-column"> <body>

@ -3,7 +3,7 @@
{{ $title := $page.Title }} {{ $title := $page.Title }}
{{ if and $page.IsHome (not $title) }} {{ if and $page.IsHome (not $title) }}
{{ $title = $page.Param "paige.site_title" | default (site.Title) }} {{ $title = $page.Param "paige.title" | default (site.Title) }}
{{ end }} {{ end }}
{{ $title = $title | markdownify | plainify | htmlUnescape }} {{ $title = $title | markdownify | plainify | htmlUnescape }}
@ -14,7 +14,7 @@
{{ $title := .Title }} {{ $title := .Title }}
{{ if and .IsHome (not $title) }} {{ if and .IsHome (not $title) }}
{{ $title = $page.Param "paige.site_title" | default (site.Title) }} {{ $title = $page.Param "paige.title" | default (site.Title) }}
{{ end }} {{ end }}
{{ $titles = $titles | append ($title | markdownify | plainify | htmlUnescape) }} {{ $titles = $titles | append ($title | markdownify | plainify | htmlUnescape) }}

Loading…
Cancel
Save