From 1403b769cdd0c8f23fef92cc6737342a18e008dd Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sat, 8 Feb 2025 15:04:53 -0800 Subject: [PATCH] Rename paige.page to paige.pages --- README.md | 18 +++++++++--------- exampleSite/content/_index.md | 2 +- exampleSite/content/customizations/_index.md | 4 ++-- exampleSite/content/customizations/show.md | 4 ++-- exampleSite/content/customizations/style.md | 4 ++-- exampleSite/hugo.toml | 2 +- layouts/_default/baseof.html | 2 +- layouts/partials/paige/page-footer.html | 8 ++++---- layouts/partials/paige/page-header.html | 18 +++++++++--------- layouts/partials/paige/schemas.html | 6 +++--- layouts/partials/paige/site-footer.html | 2 +- 11 files changed, 35 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 704efaa4..9ee0f366 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,7 @@ logo = "" # Example: "/logo.webp" managing_editor = "" # Example: "example@example.com (John Doe)" web_master = "" # Example: "example@example.com (John Doe)" -[paige.page] # Pages +[paige.pages] # Disable front matter values disable_authors = false @@ -242,24 +242,24 @@ history_url = "" # File history URL. Example: "https://github.com/account/projec # Schema base_schema = {} # JSON-LD schema that all page schemas override # Example: -# [paige.page.base_schema] +# [paige.pages.base_schema] # isAccessibleForFree = true # isFamilyFriendly = true -# [paige.page.base_schema.publisher] +# [paige.pages.base_schema.publisher] # "@type" = "Organization" # name = "John Doe" # url = "https://example.com" disable_auto_schema = false # Disables the automatic JSON-LD schema generation microdata = {} # Microdata non-property attributes (all except itemprop) for the web page # Example: -# [paige.page.microdata] +# [paige.pages.microdata] # itemid = "123" # itemref = "foo" # itemscope = "" # itemtype = "https://schema.org/Chapter schemas = [] # Page JSON-LD schemas # Example: -# [paige.page.schemas] +# [paige.pages.schemas] # "@context" = "https://schema.org" # "@type" = "Book" # name = "My Book" @@ -381,14 +381,14 @@ The "author", "description", and "keywords" meta tags are generated from the pag The keywords are the page parameters "keywords", "categories", and "tags". A JSON-LD script is generated from the page parameters, -which can be disabled with `paige.page.disable_auto_schema`. +which can be disabled with `paige.pages.disable_auto_schema`. Arbitrary schemas can be specified for the site with `paige.site.schemas` or for pages with `paige.pages.schemas`, at the site or page level. A base schema can be specified for site schemas with `paige.site.base_schema`, -and for page schemas with `paige.page.base_schema`. +and for page schemas with `paige.pages.base_schema`. HTML microdata is generated from the page parameters -if the non-property attributes are specified in `paige.page.microdata`. +if the non-property attributes are specified in `paige.pages.microdata`. ## Layouts @@ -1213,7 +1213,7 @@ disable_reading_time = true disable_series = true disable_summary = true -[params.paige.page] +[params.paige.pages] disable_authors = true disable_date = true disable_keywords = true diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 5ada74e2..c403c954 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -4,7 +4,7 @@ title = "Paige" disable_collections = true disable_pages = true disable_sections = true -[paige.page] +[paige.pages] disable_title = true +++ diff --git a/exampleSite/content/customizations/_index.md b/exampleSite/content/customizations/_index.md index ce960fc9..82038620 100644 --- a/exampleSite/content/customizations/_index.md +++ b/exampleSite/content/customizations/_index.md @@ -17,7 +17,7 @@ disable_keywords = false disable_reading_time = false disable_series = false disable_summary = false -[paige.page] +[paige.pages] disable_authors = false disable_date = false disable_keywords = false @@ -51,7 +51,7 @@ disable_keywords = false disable_reading_time = false disable_series = false disable_summary = false -[paige.page] +[paige.pages] disable_authors = false disable_date = false disable_keywords = false diff --git a/exampleSite/content/customizations/show.md b/exampleSite/content/customizations/show.md index 088a4ae8..24bfd025 100644 --- a/exampleSite/content/customizations/show.md +++ b/exampleSite/content/customizations/show.md @@ -18,7 +18,7 @@ disable_keywords = false disable_reading_time = false disable_series = false disable_summary = false -[paige.page] +[paige.pages] disable_authors = false disable_date = false disable_keywords = false @@ -54,7 +54,7 @@ disable_keywords = false disable_reading_time = false disable_series = false disable_summary = false -[paige.page] +[paige.pages] disable_authors = false disable_date = false disable_keywords = false diff --git a/exampleSite/content/customizations/style.md b/exampleSite/content/customizations/style.md index 48d2434a..d5dfba20 100644 --- a/exampleSite/content/customizations/style.md +++ b/exampleSite/content/customizations/style.md @@ -41,7 +41,7 @@ disable_keywords = false disable_reading_time = false disable_series = false disable_summary = false -[paige.page] +[paige.pages] disable_authors = false disable_date = false disable_keywords = false @@ -100,7 +100,7 @@ disable_keywords = false disable_reading_time = false disable_series = false disable_summary = false -[paige.page] +[paige.pages] disable_authors = false disable_date = false disable_keywords = false diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index c836504c..9c18f9bc 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -37,7 +37,7 @@ term = ["html"] [pagination] pagersize = 50 -[params.paige.page] +[params.paige.pages] disable_authors = true disable_date = true disable_keywords = true diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a312baf0..28e61721 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,7 +1,7 @@ {{ $page := . }} {{ $attrs := slice }} -{{ $microdata := $page.Params.paige.page.microdata }} +{{ $microdata := $page.Params.paige.pages.microdata }} {{ range $k, $v := $microdata }} {{ $attrs = $attrs | append (printf `%s="%v"` $k $v) }} diff --git a/layouts/partials/paige/page-footer.html b/layouts/partials/paige/page-footer.html index b969ac8e..4b2d916d 100644 --- a/layouts/partials/paige/page-footer.html +++ b/layouts/partials/paige/page-footer.html @@ -1,11 +1,11 @@ {{ $page := . }} -{{ $edit := $page.Param "paige.page.edit_url" | and ($page.Param "paige.page.disable_edit" | not) }} +{{ $edit := $page.Param "paige.pages.edit_url" | and ($page.Param "paige.pages.disable_edit" | not) }} {{ $first := templates.Exists "partials/paige/page-footer-first.html" }} -{{ $history := $page.Param "paige.page.history_url" | and ($page.Param "paige.page.disable_history" | not) }} +{{ $history := $page.Param "paige.pages.history_url" | and ($page.Param "paige.pages.disable_history" | not) }} {{ $last := templates.Exists "partials/paige/page-footer-last.html" }} -{{ $next := $page.NextInSection | and ($page.Param "paige.page.disable_next" | not) }} -{{ $prev := $page.PrevInSection | and ($page.Param "paige.page.disable_prev" | not) }} +{{ $next := $page.NextInSection | and ($page.Param "paige.pages.disable_next" | not) }} +{{ $prev := $page.PrevInSection | and ($page.Param "paige.pages.disable_prev" | not) }} {{ if $page.File }} {{ if $edit }} diff --git a/layouts/partials/paige/page-header.html b/layouts/partials/paige/page-header.html index bb68e8fa..32c0e673 100644 --- a/layouts/partials/paige/page-header.html +++ b/layouts/partials/paige/page-header.html @@ -1,23 +1,23 @@ {{ $page := . }} {{ $alert := $page.Param "paige.alert" }} -{{ $authors := partial "paige/func-authors.html" $page | and ($page.Param "paige.page.disable_authors" | not) }} +{{ $authors := partial "paige/func-authors.html" $page | and ($page.Param "paige.pages.disable_authors" | not) }} {{ $categories := $page.GetTerms "categories" }} -{{ $date := and $page.IsPage $page.PublishDate | and ($page.Param "paige.page.disable_date" | not) }} -{{ $description := $page.Description | markdownify | and ($page.Param "paige.page.disable_description" | not) }} +{{ $date := and $page.IsPage $page.PublishDate | and ($page.Param "paige.pages.disable_date" | not) }} +{{ $description := $page.Description | markdownify | and ($page.Param "paige.pages.disable_description" | not) }} {{ $first := templates.Exists "partials/paige/page-header-first.html" }} {{ $format := $page.Param "paige.date_format" | default ":date_long" }} {{ $last := templates.Exists "partials/paige/page-header-last.html" }} {{ $link := $page.Params.link }} -{{ $microdata := $page.Params.paige.page.microdata }} +{{ $microdata := $page.Params.paige.pages.microdata }} {{ $normal := eq ($page.Param "paige.keyword_style" | default "text") "text" }} -{{ $series := $page.GetTerms "series" | and ($page.Param "paige.page.disable_series" | not) }} +{{ $series := $page.GetTerms "series" | and ($page.Param "paige.pages.disable_series" | not) }} {{ $tags := $page.GetTerms "tags" }} -{{ $time := $page.ReadingTime | and ($page.Param "paige.page.disable_reading_time" | not) }} -{{ $title := $page.LinkTitle | markdownify | and ($page.Param "paige.page.disable_title" | not) }} -{{ $toc := and $page.Content (ne $page.TableOfContents ``) | and ($page.Param "paige.page.disable_toc" | not) }} +{{ $time := $page.ReadingTime | and ($page.Param "paige.pages.disable_reading_time" | not) }} +{{ $title := $page.LinkTitle | markdownify | and ($page.Param "paige.pages.disable_title" | not) }} +{{ $toc := and $page.Content (ne $page.TableOfContents ``) | and ($page.Param "paige.pages.disable_toc" | not) }} -{{ $keywords := sort (append $categories $tags) "LinkTitle" | and ($page.Param "paige.page.disable_keywords" | not) }} +{{ $keywords := sort (append $categories $tags) "LinkTitle" | and ($page.Param "paige.pages.disable_keywords" | not) }} {{ if or $alert $authors $date $description $first $keywords $last $time $series $title $toc }}
diff --git a/layouts/partials/paige/schemas.html b/layouts/partials/paige/schemas.html index 953f9ca8..6151cecf 100644 --- a/layouts/partials/paige/schemas.html +++ b/layouts/partials/paige/schemas.html @@ -1,14 +1,14 @@ {{ $page := . }} -{{ $auto := $page.Param "paige.page.disable_auto_schema" | not }} -{{ $pageBase := $page.Param "paige.page.base_schema" }} +{{ $auto := $page.Param "paige.pages.disable_auto_schema" | not }} +{{ $pageBase := $page.Param "paige.pages.base_schema" }} {{ $siteBase := $page.Param "paige.site.base_schema" }} {{ range $page.Param "paige.site.schemas" }} {{ end }} -{{ range $page.Param "paige.page.schemas" }} +{{ range $page.Param "paige.pages.schemas" }} {{ end }} diff --git a/layouts/partials/paige/site-footer.html b/layouts/partials/paige/site-footer.html index 9a284610..55605366 100644 --- a/layouts/partials/paige/site-footer.html +++ b/layouts/partials/paige/site-footer.html @@ -5,7 +5,7 @@ {{ $first := templates.Exists "partials/paige/footer-first.html" }} {{ $last := templates.Exists "partials/paige/footer-last.html" }} {{ $license := $page.Param "paige.license" | markdownify | and ($page.Param "paige.site.disable_license" | not) }} -{{ $microdata := $page.Params.paige.page.microdata }} +{{ $microdata := $page.Params.paige.pages.microdata }} {{ if $credit }} {{ $credit = markdownify $credit }}