From 0b84ad26264ac749ddfc16ccb6dd6b7bc9747a63 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 5 Feb 2023 10:58:44 -0800 Subject: [PATCH] Move paige.hide_{rss,search} to paige.page --- README.md | 12 ++++-------- layouts/_default/home.json | 2 +- layouts/_default/rss.xml | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 812a7ede..f4024cde 100644 --- a/README.md +++ b/README.md @@ -315,6 +315,10 @@ paige: reading_time: class: "text-center text-secondary" # Default is "text-center text-secondary" 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: class: "badge text-bg-secondary text-decoration-none" # Default is "badge text-bg-secondary text-decoration-none" hide: false # Default is false @@ -348,14 +352,6 @@ paige: 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`: ```yaml diff --git a/layouts/_default/home.json b/layouts/_default/home.json index dafca5f4..e5fbaf53 100644 --- a/layouts/_default/home.json +++ b/layouts/_default/home.json @@ -1,7 +1,7 @@ {{- $page := . -}} {{- $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 "categories" .Params.categories "date" .PublishDate diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index bfcf3437..b79d264e 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -15,7 +15,7 @@ {{ $pages = $pages | first $limit }} {{ end }} -{{ $pages = where $pages "Params.paige.hide_rss" "ne" true }} +{{ $pages = where $pages "Params.paige.page.rss.hide" "ne" true }} {{ printf "" | safeHTML }}