Move paige.hide_{rss,search} to paige.page

master
Will Faught 2 years ago
parent bf96b9af84
commit 0b84ad2626

@ -315,6 +315,10 @@ paige:
reading_time: reading_time:
class: "text-center text-secondary" # Default is "text-center text-secondary" class: "text-center text-secondary" # Default is "text-center text-secondary"
hide: false # Default is false hide: false # Default is false
rss:
hide: true # Don't include this page in RSS feeds
search:
hide: true # Don't include this page in search results
tags: tags:
class: "badge text-bg-secondary text-decoration-none" # Default is "badge text-bg-secondary text-decoration-none" class: "badge text-bg-secondary text-decoration-none" # Default is "badge text-bg-secondary text-decoration-none"
hide: false # Default is false hide: false # Default is false
@ -348,14 +352,6 @@ paige:
math: true # Enable math typesetting with KaTeX math: true # Enable math typesetting with KaTeX
``` ```
Additional optional single page parameters:
```yaml
paige:
hide_rss: true # Don't include this page in RSS feeds
hide_search: true # Don't include this page in search results
```
Example `config.yaml`: Example `config.yaml`:
```yaml ```yaml

@ -1,7 +1,7 @@
{{- $page := . -}} {{- $page := . -}}
{{- $page.Scratch.Add "paige_index" slice -}} {{- $page.Scratch.Add "paige_index" slice -}}
{{- range where site.RegularPages "Params.paige.hide_search" "ne" true -}} {{- range where site.RegularPages "Params.paige.page.search.hide" "ne" true -}}
{{- $page.Scratch.Add "paige_index" (dict {{- $page.Scratch.Add "paige_index" (dict
"categories" .Params.categories "categories" .Params.categories
"date" .PublishDate "date" .PublishDate

@ -15,7 +15,7 @@
{{ $pages = $pages | first $limit }} {{ $pages = $pages | first $limit }}
{{ end }} {{ end }}
{{ $pages = where $pages "Params.paige.hide_rss" "ne" true }} {{ $pages = where $pages "Params.paige.page.rss.hide" "ne" true }}
{{ 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">

Loading…
Cancel
Save