Rename vars to match values

master
Will Faught 4 months ago
parent 427512f1c7
commit cc789d7718

@ -108,11 +108,11 @@
{{ if not (.Param "paige.exclude_feeds") }} {{ if not (.Param "paige.exclude_feeds") }}
<entry> <entry>
{{ $content := partial "paige/func-content.html" $subpage }} {{ $content := partial "paige/func-content.html" $subpage }}
{{ $description := markdownify .Description }}
{{ $external := and .Params.link (not (.Param "paige.feeds.disable_link")) | not | not }} {{ $external := and .Params.link (not (.Param "paige.feeds.disable_link")) | 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 }}
{{ $lastmod := .Lastmod.Format $date }} {{ $lastmod := .Lastmod.Format $date }}
{{ $published := cond (not .PublishDate.IsZero) (.PublishDate.Format $date) "" }} {{ $published := cond (not .PublishDate.IsZero) (.PublishDate.Format $date) "" }}
{{ $summary := markdownify .Description }}
{{ $title := markdownify .Title }} {{ $title := markdownify .Title }}
{{ $link := cond $external .Params.link .Permalink }} {{ $link := cond $external .Params.link .Permalink }}
@ -188,7 +188,7 @@
<rights type="html"><![CDATA[{{ . }}]]></rights> <rights type="html"><![CDATA[{{ . }}]]></rights>
{{ end }} {{ end }}
{{ with $summary }} {{ with $description }}
<summary type="html"><![CDATA[{{ . }}]]></summary> <summary type="html"><![CDATA[{{ . }}]]></summary>
{{ end }} {{ end }}

@ -97,7 +97,7 @@
<item> <item>
{{ $author := "" }} {{ $author := "" }}
{{ $authors := partial "paige/func-authors.html" . }} {{ $authors := partial "paige/func-authors.html" . }}
{{ $description := partial "paige/func-content.html" $subpage }} {{ $content := partial "paige/func-content.html" $subpage }}
{{ $external := and .Params.link (not (.Param "paige.feeds.disable_link")) | not | not }} {{ $external := and .Params.link (not (.Param "paige.feeds.disable_link")) | 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 $date }} {{ $published := .PublishDate.Format $date }}
@ -105,7 +105,7 @@
{{ $link := cond $external .Params.link .Permalink }} {{ $link := cond $external .Params.link .Permalink }}
{{ $description = partial "paige/func-minify.html" (dict "content" $description) }} {{ $content = partial "paige/func-minify.html" (dict "content" $content) }}
{{ with $authors }} {{ with $authors }}
{{ $primary := index . 0 }} {{ $primary := index . 0 }}
@ -117,26 +117,26 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if and $description $external }} {{ if and $content $external }}
{{ $text := or (.Param "paige.feeds.page_link" | markdownify) "⏎" }} {{ $text := or (.Param "paige.feeds.page_link" | markdownify) "⏎" }}
{{ $footer := printf `<p><a href="%s">%s</a></p>` .Permalink $text | safeHTML }} {{ $footer := printf `<p><a href="%s">%s</a></p>` .Permalink $text | safeHTML }}
{{ $description = print $description $footer }} {{ $content = print $content $footer }}
{{ end }} {{ end }}
{{ if not $description }} {{ if not $content }}
{{ $description = .Description | markdownify }} {{ $content = .Description | markdownify }}
{{ end }} {{ end }}
{{ $description = replaceRE `<a href="#fn:(\d+)" class="footnote-ref" role="doc-noteref">` (printf `<a href="%s#fn:$1" class="footnote-ref" role="doc-noteref">` .Permalink) $description }} {{ $content = replaceRE `<a href="#fn:(\d+)" class="footnote-ref" role="doc-noteref">` (printf `<a href="%s#fn:$1" class="footnote-ref" role="doc-noteref">` .Permalink) $content }}
{{ $description = replaceRE `<a href="#fnref:(\d+)" class="footnote-backref" role="doc-backlink">` (printf `<a href="%s#fnref:$1" class="footnote-backref" role="doc-backlink">` .Permalink) $description }} {{ $content = replaceRE `<a href="#fnref:(\d+)" class="footnote-backref" role="doc-backlink">` (printf `<a href="%s#fnref:$1" class="footnote-backref" role="doc-backlink">` .Permalink) $content }}
{{ with $author }} {{ with $author }}
<author>{{ . }}</author> <author>{{ . }}</author>
{{ end }} {{ end }}
{{ with $description }} {{ with $content }}
<description><![CDATA[{{ . }}]]></description> <description><![CDATA[{{ . }}]]></description>
{{ end }} {{ end }}

Loading…
Cancel
Save