Use camel case for vars

This commit is contained in:
Will Faught
2025-02-06 21:42:51 -08:00
parent b840f2233a
commit 20798f3a3a
22 changed files with 226 additions and 228 deletions

View File

@@ -1,19 +1,19 @@
{{ $page := . }}
{{ $build := false }}
{{ $copyright := site.Copyright | markdownify | plainify | htmlUnescape }}
{{ $description := or $page.Description (i18n "paige_recent_content") }}
{{ $editor := $page.Param "paige.feed.rss.managing_editor" }}
{{ $format := "Mon, 02 Jan 2006 15:04:05 MST" }}
{{ $language := site.LanguageCode | default site.Language.Lang }}
{{ $lastbuilddate := false }}
{{ $limit := site.Config.Services.RSS.Limit }}
{{ $link := ($page.AlternativeOutputFormats.Get "html").Permalink }}
{{ $managingeditor := $page.Param "paige.feed.rss.managing_editor" }}
{{ $master := $page.Param "paige.feed.rss.web_master" }}
{{ $subpages := slice }}
{{ $webmaster := $page.Param "paige.feed.rss.web_master" }}
{{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }}
{{ if or (and (not $lastbuilddate) (not .Lastmod.IsZero)) (and $lastbuilddate (lt $lastbuilddate .Lastmod)) }}
{{ $lastbuilddate = .Lastmod }}
{{ if or (and (not $build) (not .Lastmod.IsZero)) (and $build (lt $build .Lastmod)) }}
{{ $build = .Lastmod }}
{{ end }}
{{ if not (.Param "paige.feed.disable") }}
@@ -72,19 +72,19 @@
<language>{{ . }}</language>
{{ end }}
{{ with $lastbuilddate }}
{{ with $build }}
<lastBuildDate>{{ . }}</lastBuildDate>
{{ end }}
<link>{{ $link }}</link>
{{ with $managingeditor }}
{{ with $editor }}
<managingEditor>{{ . }}</managingEditor>
{{ end }}
<title>{{ $title }}</title>
{{ with $webmaster }}
{{ with $master }}
<webMaster>{{ . }}</webMaster>
{{ end }}
@@ -93,12 +93,12 @@
{{ $author := "" }}
{{ $authors := partial "paige/func-authors.html" . }}
{{ $description := .Content }}
{{ $external := and .Params.link (not (.Param "paige.feed.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) }}
{{ $paramlink := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }}
{{ $pubdate := .PublishDate.Format $format }}
{{ $published := .PublishDate.Format $format }}
{{ $title := .Title | markdownify | plainify | htmlUnescape }}
{{ $link := cond $paramlink .Params.link .Permalink }}
{{ $link := cond $external .Params.link .Permalink }}
{{ with $authors }}
{{ $primary := index . 0 }}
@@ -110,10 +110,10 @@
{{ end }}
{{ end }}
{{ if and $description $paramlink }}
{{ $pagelink := or (.Param "paige.feed.page_link" | markdownify) "⏎" }}
{{ if and $description $external }}
{{ $text := or (.Param "paige.feed.page_link" | markdownify) "⏎" }}
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape $title) $pagelink | safeHTML }}
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape $title) $text | safeHTML }}
{{ $description = print $description $footer }}
{{ end }}
@@ -143,7 +143,7 @@
<link>{{ . }}</link>
{{ end }}
{{ with $pubdate }}
{{ with $published }}
<pubDate>{{ . }}</pubDate>
{{ end }}