Add underscores to parameters

master
Will Faught 3 years ago
parent bc708f24f8
commit df5ec6296e

@ -172,22 +172,22 @@ Optional site parameters:
```yaml ```yaml
math: true # Enable math typesetting with KaTeX math: true # Enable math typesetting with KaTeX
paigebootstrapstyles: "/my-assets/my-bootstrap.min.css" # Use local Bootstrap styles paige_bootstrap_styles: "/my-assets/my-bootstrap.min.css" # Use local Bootstrap styles
paigebootstrapicons: "/my-assets/my-bootstrap-icons.css" # Use local Bootstrap icons paige_bootstrap_icons: "/my-assets/my-bootstrap-icons.css" # Use local Bootstrap icons
paigebootstrapscripts: "/my-assets/my-bootstrap.bundle.min.js" # Use local Bootstrap scripts paige_bootstrap_scripts: "/my-assets/my-bootstrap.bundle.min.js" # Use local Bootstrap scripts
paigedateformat: "2006 January 2" # Hugo date format for page dates paige_date_format: "2006 January 2" # Hugo date format for page dates
paigehidethemecomment: true # Don't put a link to this project in a code comment paige_hide_theme_comment: 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_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: Optional page parameters:
```yaml ```yaml
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
math: true # Enable math typesetting with KaTeX 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: 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: Additional optional list page parameters:
```yaml ```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: Additional optional single page parameters:
```yaml ```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`: Example `config.yaml`:

@ -44,8 +44,8 @@ outputs:
- rss - rss
paginate: 50 paginate: 50
params: params:
paigehidethemecomment: true paige_hide_theme_comment: true
paigehidethemelink: true paige_hide_theme_link: true
permalinks: permalinks:
blog: /blog/:year/:month/:day/:title/ blog: /blog/:year/:month/:day/:title/
social: social:

@ -21,6 +21,6 @@
{{ end }} {{ end }}
</body> </body>
</html> </html>
{{ if not .Site.Params.paigehidethemecomment }} {{ if not .Site.Params.paige_hide_theme_comment }}
{{ printf "<!-- Paige theme from https://github.com/willfaught/paige -->" | safeHTML }} {{ printf "<!-- Paige theme from https://github.com/willfaught/paige -->" | safeHTML }}
{{ end }} {{ end }}

@ -1,5 +1,5 @@
{{- $.Scratch.Add "index" slice -}} {{- $.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 -}} {{- $title := .Title | markdownify | plainify | htmlUnescape -}}
{{- if and (not $title) .IsHome }} {{- if and (not $title) .IsHome }}
{{- $title = site.Title }} {{- $title = site.Title }}

@ -12,7 +12,7 @@
{{ if ge $limit 1 }} {{ if ge $limit 1 }}
{{ $pages = $pages | first $limit }} {{ $pages = $pages | first $limit }}
{{ end }} {{ end }}
{{ $pages = where $pages "Params.paigehiderss" "ne" true }} {{ $pages = where $pages "Params.paige_hide_rss" "ne" true }}
{{ $title := partial "paige-titles.html" . }} {{ $title := partial "paige-titles.html" . }}
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

@ -1,6 +1,6 @@
{{ with .PublishDate }} {{ with .PublishDate }}
{{ $format := ":date_long" }} {{ $format := ":date_long" }}
{{ with site.Params.paigedateformat }} {{ with site.Params.paige_date_format }}
{{ $format = . }} {{ $format = . }}
{{ end }} {{ end }}
<p class="text-center text-muted"><time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $format . }}</time></p> <p class="text-center text-muted"><time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $format . }}</time></p>

@ -1,10 +1,10 @@
{{ if or .Site.Copyright (not .Site.Params.paigehidethemelink) }} {{ if or .Site.Copyright (not .Site.Params.paige_hide_theme_link) }}
<footer> <footer>
{{ if and .Site.Copyright (not .Site.Params.paigehidethemelink) }} {{ if and .Site.Copyright (not .Site.Params.paige_hide_theme_link) }}
<p class="text-center text-muted">{{ .Site.Copyright | markdownify }} · <a class="link-secondary text-decoration-none" href="https://github.com/willfaught/paige">Paige Theme</a></p> <p class="text-center text-muted">{{ .Site.Copyright | markdownify }} · <a class="link-secondary text-decoration-none" href="https://github.com/willfaught/paige">Paige Theme</a></p>
{{ else if .Site.Copyright }} {{ else if .Site.Copyright }}
<p class="text-center text-muted">{{ .Site.Copyright | markdownify }}</p> <p class="text-center text-muted">{{ .Site.Copyright | markdownify }}</p>
{{ else if not .Site.Params.paigehidethemelink }} {{ else if not .Site.Params.paige_hide_theme_link }}
<p class="text-center"><a class="link-secondary text-decoration-none" href="https://github.com/willfaught/paige">Paige Theme</a></p> <p class="text-center"><a class="link-secondary text-decoration-none" href="https://github.com/willfaught/paige">Paige Theme</a></p>
{{ end }} {{ end }}
</footer> </footer>

@ -1,9 +1,9 @@
{{ with .Site.Params.paigebootstrapstyles }} {{ with .Site.Params.paige_bootstrap_styles }}
<link href="{{ relURL . }}" rel="stylesheet"> <link href="{{ relURL . }}" rel="stylesheet">
{{ else }} {{ else }}
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" rel="stylesheet"> <link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" rel="stylesheet">
{{ end }} {{ end }}
{{ with .Site.Params.paigebootstrapicons }} {{ with .Site.Params.paige_bootstrap_icons }}
<link href="{{ relURL . }}" rel="stylesheet"> <link href="{{ relURL . }}" rel="stylesheet">
{{ else }} {{ else }}
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" integrity="sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" rel="stylesheet"> <link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" integrity="sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" rel="stylesheet">

@ -1,5 +1,5 @@
{{ if .Pages }} {{ if .Pages }}
{{ if .Params.paigeshowfullpages }} {{ if .Params.paige_show_full_pages }}
{{ $page := . }} {{ $page := . }}
{{ $p := .Paginate .Pages }} {{ $p := .Paginate .Pages }}
{{ range $p.Pages }} {{ range $p.Pages }}

@ -1,4 +1,4 @@
{{ with .Site.Params.paigebootstrapscripts }} {{ with .Site.Params.paige_bootstrap_scripts }}
<script defer src="{{ relURL . }}"></script> <script defer src="{{ relURL . }}"></script>
{{ else }} {{ else }}
<script crossorigin="anonymous" defer integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" referrerpolicy="no-referrer" src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script> <script crossorigin="anonymous" defer integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" referrerpolicy="no-referrer" src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script>

@ -6,7 +6,7 @@
{{ $title = .Site.Title }} {{ $title = .Site.Title }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if and $title (not .Params.paigeshowfullpages) }} {{ if and $title (not .Params.paige_show_full_pages) }}
<h1 class="{{ $class }} fw-bold text-center"> <h1 class="{{ $class }} fw-bold text-center">
{{ with .Params.link }} {{ with .Params.link }}
<a href="{{ . }}">{{ $title | markdownify }}</a> <a href="{{ . }}">{{ $title | markdownify }}</a>

Loading…
Cancel
Save