From df5ec6296e9cab7ab8b53ece18626625259778d8 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Thu, 15 Dec 2022 20:03:50 -0800 Subject: [PATCH] Add underscores to parameters --- README.md | 20 ++++++++++---------- exampleSite/config.yaml | 4 ++-- layouts/_default/baseof.html | 2 +- layouts/_default/home.json | 2 +- layouts/_default/rss.xml | 2 +- layouts/partials/paige-date.html | 2 +- layouts/partials/paige-footer.html | 6 +++--- layouts/partials/paige-link.html | 4 ++-- layouts/partials/paige-pages.html | 2 +- layouts/partials/paige-script.html | 2 +- layouts/partials/paige-title.html | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index a3e5ec1d..a165f69a 100644 --- a/README.md +++ b/README.md @@ -172,22 +172,22 @@ Optional site parameters: ```yaml math: true # Enable math typesetting with KaTeX -paigebootstrapstyles: "/my-assets/my-bootstrap.min.css" # Use local Bootstrap styles -paigebootstrapicons: "/my-assets/my-bootstrap-icons.css" # Use local Bootstrap icons -paigebootstrapscripts: "/my-assets/my-bootstrap.bundle.min.js" # Use local Bootstrap scripts -paigedateformat: "2006 January 2" # Hugo date format for page dates -paigehidethemecomment: true # Don't put a link to this project in a code comment -paigehidethemelink: true # Don't put a link to this project in the footer +paige_bootstrap_styles: "/my-assets/my-bootstrap.min.css" # Use local Bootstrap styles +paige_bootstrap_icons: "/my-assets/my-bootstrap-icons.css" # Use local Bootstrap icons +paige_bootstrap_scripts: "/my-assets/my-bootstrap.bundle.min.js" # Use local Bootstrap scripts +paige_date_format: "2006 January 2" # Hugo date format for page dates +paige_hide_theme_comment: true # Don't put a link to this project in a code comment +paige_hide_theme_link: true # Don't put a link to this project in the footer ``` -If you set either `paigehidethemecomment` or `paigehidethemelink`, please credit this project in a post so others may find it. +If you set either `paige_hide_theme_comment` or `paige_hide_theme_link`, please credit this project in a post so others may find it. Optional page parameters: ```yaml link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title math: true # Enable math typesetting with KaTeX -paigehidesearch: true # Don't include this page in search results +paige_hide_search: true # Don't include this page in search results ``` Additional optional home page parameters: @@ -202,13 +202,13 @@ stretch: "my-stretch.jpg" # A 4x3 or panorama image that is stretched fully hori Additional optional list page parameters: ```yaml -paigeshowfullpages: true # Show full pages, not just page titles and descriptions +paige_show_full_pages: true # Show full pages, not just page titles and descriptions ``` Additional optional single page parameters: ```yaml -paigehiderss: true # Don't include this page in RSS feeds +paige_hide_rss: true # Don't include this page in RSS feeds ``` Example `config.yaml`: diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 8306590d..ed7b8d5e 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -44,8 +44,8 @@ outputs: - rss paginate: 50 params: - paigehidethemecomment: true - paigehidethemelink: true + paige_hide_theme_comment: true + paige_hide_theme_link: true permalinks: blog: /blog/:year/:month/:day/:title/ social: diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 482a1a61..190b34fe 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -21,6 +21,6 @@ {{ end }} -{{ if not .Site.Params.paigehidethemecomment }} +{{ if not .Site.Params.paige_hide_theme_comment }} {{ printf "" | safeHTML }} {{ end }} diff --git a/layouts/_default/home.json b/layouts/_default/home.json index 311ff353..db04bf68 100644 --- a/layouts/_default/home.json +++ b/layouts/_default/home.json @@ -1,5 +1,5 @@ {{- $.Scratch.Add "index" slice -}} -{{- range where .Site.Pages "Params.paigehidesearch" "ne" true -}} +{{- range where .Site.Pages "Params.paige_hide_search" "ne" true -}} {{- $title := .Title | markdownify | plainify | htmlUnescape -}} {{- if and (not $title) .IsHome }} {{- $title = site.Title }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index d1ac4ed9..696c05d9 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -12,7 +12,7 @@ {{ if ge $limit 1 }} {{ $pages = $pages | first $limit }} {{ end }} -{{ $pages = where $pages "Params.paigehiderss" "ne" true }} +{{ $pages = where $pages "Params.paige_hide_rss" "ne" true }} {{ $title := partial "paige-titles.html" . }} {{ printf "" | safeHTML }} diff --git a/layouts/partials/paige-date.html b/layouts/partials/paige-date.html index 1dfffa47..73bc4eb1 100644 --- a/layouts/partials/paige-date.html +++ b/layouts/partials/paige-date.html @@ -1,6 +1,6 @@ {{ with .PublishDate }} {{ $format := ":date_long" }} -{{ with site.Params.paigedateformat }} +{{ with site.Params.paige_date_format }} {{ $format = . }} {{ end }}

diff --git a/layouts/partials/paige-footer.html b/layouts/partials/paige-footer.html index eee4d7ca..2fa6d569 100644 --- a/layouts/partials/paige-footer.html +++ b/layouts/partials/paige-footer.html @@ -1,10 +1,10 @@ -{{ if or .Site.Copyright (not .Site.Params.paigehidethemelink) }} +{{ if or .Site.Copyright (not .Site.Params.paige_hide_theme_link) }}
- {{ if and .Site.Copyright (not .Site.Params.paigehidethemelink) }} + {{ if and .Site.Copyright (not .Site.Params.paige_hide_theme_link) }}

{{ .Site.Copyright | markdownify }} ยท Paige Theme

{{ else if .Site.Copyright }}

{{ .Site.Copyright | markdownify }}

- {{ else if not .Site.Params.paigehidethemelink }} + {{ else if not .Site.Params.paige_hide_theme_link }}

Paige Theme

{{ end }}
diff --git a/layouts/partials/paige-link.html b/layouts/partials/paige-link.html index 9d7ba6f4..afa37392 100644 --- a/layouts/partials/paige-link.html +++ b/layouts/partials/paige-link.html @@ -1,9 +1,9 @@ -{{ with .Site.Params.paigebootstrapstyles }} +{{ with .Site.Params.paige_bootstrap_styles }} {{ else }} {{ end }} -{{ with .Site.Params.paigebootstrapicons }} +{{ with .Site.Params.paige_bootstrap_icons }} {{ else }} diff --git a/layouts/partials/paige-pages.html b/layouts/partials/paige-pages.html index 1d18990b..bf8434b7 100644 --- a/layouts/partials/paige-pages.html +++ b/layouts/partials/paige-pages.html @@ -1,5 +1,5 @@ {{ if .Pages }} -{{ if .Params.paigeshowfullpages }} +{{ if .Params.paige_show_full_pages }} {{ $page := . }} {{ $p := .Paginate .Pages }} {{ range $p.Pages }} diff --git a/layouts/partials/paige-script.html b/layouts/partials/paige-script.html index bbec6e9b..542563e2 100644 --- a/layouts/partials/paige-script.html +++ b/layouts/partials/paige-script.html @@ -1,4 +1,4 @@ -{{ with .Site.Params.paigebootstrapscripts }} +{{ with .Site.Params.paige_bootstrap_scripts }} {{ else }} diff --git a/layouts/partials/paige-title.html b/layouts/partials/paige-title.html index 96cfd1eb..7ba54cec 100644 --- a/layouts/partials/paige-title.html +++ b/layouts/partials/paige-title.html @@ -6,7 +6,7 @@ {{ $title = .Site.Title }} {{ end }} {{ end }} -{{ if and $title (not .Params.paigeshowfullpages) }} +{{ if and $title (not .Params.paige_show_full_pages) }}

{{ with .Params.link }} {{ $title | markdownify }}