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

@ -97,7 +97,7 @@
<item>
{{ $author := "" }}
{{ $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 }}
{{ $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 }}
@ -105,7 +105,7 @@
{{ $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 }}
{{ $primary := index . 0 }}
@ -117,26 +117,26 @@
{{ end }}
{{ end }}
{{ if and $description $external }}
{{ if and $content $external }}
{{ $text := or (.Param "paige.feeds.page_link" | markdownify) "⏎" }}
{{ $footer := printf `<p><a href="%s">%s</a></p>` .Permalink $text | safeHTML }}
{{ $description = print $description $footer }}
{{ $content = print $content $footer }}
{{ end }}
{{ if not $description }}
{{ $description = .Description | markdownify }}
{{ if not $content }}
{{ $content = .Description | markdownify }}
{{ 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 }}
{{ $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="#fn:(\d+)" class="footnote-ref" role="doc-noteref">` (printf `<a href="%s#fn:$1" class="footnote-ref" role="doc-noteref">` .Permalink) $content }}
{{ $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 }}
<author>{{ . }}</author>
{{ end }}
{{ with $description }}
{{ with $content }}
<description><![CDATA[{{ . }}]]></description>
{{ end }}

Loading…
Cancel
Save