Rename paige.feed to paige.feeds

master
Will Faught 5 months ago
parent 64f5ef52a1
commit cb6ee16521

@ -280,22 +280,22 @@ site = ""
repo = "" repo = ""
theme = "" theme = ""
[paige.feed] [paige.feeds]
disable = false # Exclude the page from feeds disable = false # Exclude the page from feeds
link_to_page = false # Link to the page instead of the front matter link, if present 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 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 = [] authors = []
# Example: # Example:
# [[paige.feed.atom.authors]] # [[paige.feeds.atom.authors]]
# email = "example@example.com" # email = "example@example.com"
# name = "John Doe" # name = "John Doe"
# url = "https://github.com/account/project" # url = "https://github.com/account/project"
icon = "" # Example: "/icon.webp" icon = "" # Example: "/icon.webp"
logo = "" # Example: "/logo.webp" logo = "" # Example: "/logo.webp"
[paige.feed.rss] [paige.feeds.rss]
managing_editor = "" # Example: "example@example.com (John Doe)" managing_editor = "" # Example: "example@example.com (John Doe)"
web_master = "" # Example: "example@example.com (John Doe)" web_master = "" # Example: "example@example.com (John Doe)"

@ -59,12 +59,12 @@ disable_reading_time = true
disable_series = true disable_series = true
disable_summary = true disable_summary = true
[[params.paige.feed.atom.authors]] [[params.paige.feeds.atom.authors]]
email = "example@example.com" email = "example@example.com"
name = "John Doe" name = "John Doe"
url = "https://example.com" url = "https://example.com"
[params.paige.feed.rss] [params.paige.feeds.rss]
managing_editor = "example@example.com (John Doe)" managing_editor = "example@example.com (John Doe)"
web_master = "example@example.com (John Doe)" web_master = "example@example.com (John Doe)"

@ -1,19 +1,19 @@
{{ $page := . }} {{ $page := . }}
{{ $authors := $page.Param "paige.feed.atom.authors" }} {{ $authors := $page.Param "paige.feeds.atom.authors" }}
{{ $format := "2006-01-02T15:04:05Z07:00" }} {{ $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 }} {{ $id := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") .RelPermalink }}
{{ $language := site.LanguageCode | default site.Language.Lang }} {{ $language := site.LanguageCode | default site.Language.Lang }}
{{ $limit := site.Config.Services.RSS.Limit }} {{ $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 }} {{ $rights := site.Copyright | markdownify }}
{{ $subpages := slice }} {{ $subpages := slice }}
{{ $subtitle := $page.Description | markdownify }} {{ $subtitle := $page.Description | markdownify }}
{{ $updated := site.Lastmod.Format $format }} {{ $updated := site.Lastmod.Format $format }}
{{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }} {{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }}
{{ if not (.Param "paige.feed.disable") }} {{ if not (.Param "paige.feeds.disable") }}
{{ $subpages = $subpages | append . }} {{ $subpages = $subpages | append . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
@ -98,7 +98,7 @@
{{ range $subpage := $subpages }} {{ range $subpage := $subpages }}
<entry> <entry>
{{ $content := .Content }} {{ $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 }} {{ $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) "" }} {{ $published := cond (not .PublishDate.IsZero) (.PublishDate.Format $format) "" }}
{{ $summary := .Description | markdownify }} {{ $summary := .Description | markdownify }}
@ -108,7 +108,7 @@
{{ $link := cond $external .Params.link .Permalink }} {{ $link := cond $external .Params.link .Permalink }}
{{ if and $content $external }} {{ if and $content $external }}
{{ $text := or (.Param "paige.feed.page_link" | markdownify) "⏎" }} {{ $text := or (.Param "paige.feeds.page_link" | markdownify) "⏎" }}
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape .Title) $text | safeHTML }} {{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape .Title) $text | safeHTML }}
@ -124,7 +124,7 @@
{{ end }} {{ end }}
{{ if .Lastmod.IsZero }} {{ 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 }} {{ end }}
{{ with partial "paige/func-authors.html" . }} {{ with partial "paige/func-authors.html" . }}

@ -3,12 +3,12 @@
{{ $build := false }} {{ $build := false }}
{{ $copyright := site.Copyright | markdownify | plainify | htmlUnescape }} {{ $copyright := site.Copyright | markdownify | plainify | htmlUnescape }}
{{ $description := or $page.Description (i18n "paige_recent_content") }} {{ $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" }} {{ $format := "Mon, 02 Jan 2006 15:04:05 MST" }}
{{ $language := site.LanguageCode | default site.Language.Lang }} {{ $language := site.LanguageCode | default site.Language.Lang }}
{{ $limit := site.Config.Services.RSS.Limit }} {{ $limit := site.Config.Services.RSS.Limit }}
{{ $link := ($page.AlternativeOutputFormats.Get "html").Permalink }} {{ $link := ($page.AlternativeOutputFormats.Get "html").Permalink }}
{{ $master := $page.Param "paige.feed.rss.web_master" }} {{ $master := $page.Param "paige.feeds.rss.web_master" }}
{{ $subpages := slice }} {{ $subpages := slice }}
{{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }} {{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }}
@ -16,7 +16,7 @@
{{ $build = .Lastmod }} {{ $build = .Lastmod }}
{{ end }} {{ end }}
{{ if not (.Param "paige.feed.disable") }} {{ if not (.Param "paige.feeds.disable") }}
{{ $subpages = $subpages | append . }} {{ $subpages = $subpages | append . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
@ -93,7 +93,7 @@
{{ $author := "" }} {{ $author := "" }}
{{ $authors := partial "paige/func-authors.html" . }} {{ $authors := partial "paige/func-authors.html" . }}
{{ $description := .Content }} {{ $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) }} {{ $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 }} {{ $published := .PublishDate.Format $format }}
{{ $title := .Title | markdownify | plainify | htmlUnescape }} {{ $title := .Title | markdownify | plainify | htmlUnescape }}
@ -111,7 +111,7 @@
{{ end }} {{ end }}
{{ if and $description $external }} {{ if and $description $external }}
{{ $text := or (.Param "paige.feed.page_link" | markdownify) "⏎" }} {{ $text := or (.Param "paige.feeds.page_link" | markdownify) "⏎" }}
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape $title) $text | safeHTML }} {{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape $title) $text | safeHTML }}

Loading…
Cancel
Save