diff --git a/README.md b/README.md index 6f11f070..bbb2d586 100644 --- a/README.md +++ b/README.md @@ -280,22 +280,22 @@ site = "" repo = "" theme = "" -[paige.feed] +[paige.feeds] disable = false # Exclude the page from feeds link_to_page = false # Link to the page instead of the front matter link, if present page_link = "⏎" # If a front matter link is present, and link_to_page is false, then link to the page with this text -[paige.feed.atom] +[paige.feeds.atom] authors = [] # Example: -# [[paige.feed.atom.authors]] +# [[paige.feeds.atom.authors]] # email = "example@example.com" # name = "John Doe" # url = "https://github.com/account/project" icon = "" # Example: "/icon.webp" logo = "" # Example: "/logo.webp" -[paige.feed.rss] +[paige.feeds.rss] managing_editor = "" # Example: "example@example.com (John Doe)" web_master = "" # Example: "example@example.com (John Doe)" diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index c8109503..52a264e0 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -59,12 +59,12 @@ disable_reading_time = true disable_series = true disable_summary = true -[[params.paige.feed.atom.authors]] +[[params.paige.feeds.atom.authors]] email = "example@example.com" name = "John Doe" url = "https://example.com" -[params.paige.feed.rss] +[params.paige.feeds.rss] managing_editor = "example@example.com (John Doe)" web_master = "example@example.com (John Doe)" diff --git a/layouts/_default/list.atom.xml b/layouts/_default/list.atom.xml index 1d27ee9c..a83591be 100644 --- a/layouts/_default/list.atom.xml +++ b/layouts/_default/list.atom.xml @@ -1,19 +1,19 @@ {{ $page := . }} -{{ $authors := $page.Param "paige.feed.atom.authors" }} +{{ $authors := $page.Param "paige.feeds.atom.authors" }} {{ $format := "2006-01-02T15:04:05Z07:00" }} -{{ $icon := $page.Param "paige.feed.atom.icon" | absLangURL }} +{{ $icon := $page.Param "paige.feeds.atom.icon" | absLangURL }} {{ $id := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") .RelPermalink }} {{ $language := site.LanguageCode | default site.Language.Lang }} {{ $limit := site.Config.Services.RSS.Limit }} -{{ $logo := $page.Param "paige.feed.atom.logo" | absLangURL }} +{{ $logo := $page.Param "paige.feeds.atom.logo" | absLangURL }} {{ $rights := site.Copyright | markdownify }} {{ $subpages := slice }} {{ $subtitle := $page.Description | markdownify }} {{ $updated := site.Lastmod.Format $format }} {{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }} - {{ if not (.Param "paige.feed.disable") }} + {{ if not (.Param "paige.feeds.disable") }} {{ $subpages = $subpages | append . }} {{ end }} {{ end }} @@ -98,7 +98,7 @@ {{ range $subpage := $subpages }} {{ $content := .Content }} - {{ $external := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }} + {{ $external := and .Params.link (not (.Param "paige.feeds.link_to_page")) | not | not }} {{ $id := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") .RelPermalink }} {{ $published := cond (not .PublishDate.IsZero) (.PublishDate.Format $format) "" }} {{ $summary := .Description | markdownify }} @@ -108,7 +108,7 @@ {{ $link := cond $external .Params.link .Permalink }} {{ if and $content $external }} - {{ $text := or (.Param "paige.feed.page_link" | markdownify) "⏎" }} + {{ $text := or (.Param "paige.feeds.page_link" | markdownify) "⏎" }} {{ $footer := printf `

%s

` .Permalink (htmlEscape .Title) $text | safeHTML }} @@ -124,7 +124,7 @@ {{ end }} {{ if .Lastmod.IsZero }} - {{ warnf "layouts/_default/list.atom.xml: Page %s does not have a modified date. The atom output requires a modified date. Either set the page's date parameter, or set the page's paige.feed.disable parameter to true, or disable the atom output." .RelPermalink }} + {{ warnf "layouts/_default/list.atom.xml: Page %s does not have a modified date. The atom output requires a modified date. Either set the page's date parameter, or set the page's paige.feeds.disable parameter to true, or disable the atom output." .RelPermalink }} {{ end }} {{ with partial "paige/func-authors.html" . }} diff --git a/layouts/_default/list.rss.xml b/layouts/_default/list.rss.xml index 284b5313..51793ac1 100644 --- a/layouts/_default/list.rss.xml +++ b/layouts/_default/list.rss.xml @@ -3,12 +3,12 @@ {{ $build := false }} {{ $copyright := site.Copyright | markdownify | plainify | htmlUnescape }} {{ $description := or $page.Description (i18n "paige_recent_content") }} -{{ $editor := $page.Param "paige.feed.rss.managing_editor" }} +{{ $editor := $page.Param "paige.feeds.rss.managing_editor" }} {{ $format := "Mon, 02 Jan 2006 15:04:05 MST" }} {{ $language := site.LanguageCode | default site.Language.Lang }} {{ $limit := site.Config.Services.RSS.Limit }} {{ $link := ($page.AlternativeOutputFormats.Get "html").Permalink }} -{{ $master := $page.Param "paige.feed.rss.web_master" }} +{{ $master := $page.Param "paige.feeds.rss.web_master" }} {{ $subpages := slice }} {{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }} @@ -16,7 +16,7 @@ {{ $build = .Lastmod }} {{ end }} - {{ if not (.Param "paige.feed.disable") }} + {{ if not (.Param "paige.feeds.disable") }} {{ $subpages = $subpages | append . }} {{ end }} {{ end }} @@ -93,7 +93,7 @@ {{ $author := "" }} {{ $authors := partial "paige/func-authors.html" . }} {{ $description := .Content }} - {{ $external := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }} + {{ $external := and .Params.link (not (.Param "paige.feeds.link_to_page")) | not | not }} {{ $guid := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") (cond (.Params.id | not) .RelPermalink .Params.id) }} {{ $published := .PublishDate.Format $format }} {{ $title := .Title | markdownify | plainify | htmlUnescape }} @@ -111,7 +111,7 @@ {{ end }} {{ if and $description $external }} - {{ $text := or (.Param "paige.feed.page_link" | markdownify) "⏎" }} + {{ $text := or (.Param "paige.feeds.page_link" | markdownify) "⏎" }} {{ $footer := printf `

%s

` .Permalink (htmlEscape $title) $text | safeHTML }}