master
Will Faught 2 years ago
parent 77bb7d0de0
commit b9f319f4c5

@ -6,13 +6,17 @@
<section> <section>
{{ if $page.Params.image_url }} {{ if $page.Params.image_url }}
{{ $class := "mw-100 rounded-4 shadow" }} {{ $class := "mw-100 rounded-4 shadow" }}
{{ if $page.Params.image_stretch }} {{ if $page.Params.image_stretch }}
{{ $class = "rounded-4 shadow w-100" }} {{ $class = "rounded-4 shadow w-100" }}
{{ end }} {{ end }}
{{ $style := "height: 20rem" }} {{ $style := "height: 20rem" }}
{{ if $page.Params.image_stretch }} {{ if $page.Params.image_stretch }}
{{ $style = "height: 20rem; object-fit: cover" }} {{ $style = "height: 20rem; object-fit: cover" }}
{{ end }} {{ end }}
<p {{ if not .Params.image_stretch }} class="text-center" {{ end }}> <p {{ if not .Params.image_stretch }} class="text-center" {{ end }}>
{{ partial "paige/img.html" (dict {{ partial "paige/img.html" (dict
"class" $class "class" $class
@ -25,16 +29,16 @@
</p> </p>
{{ end }} {{ end }}
{{ with $page.Params.greeting }} {{ with $page.Params.greeting }}
<p class="display-5 fw-bold h2 text-center">{{ . | markdownify }}</p> <p class="display-5 fw-bold h2 text-center">{{ . | markdownify }}</p>
{{ end }} {{ end }}
{{ with $page.Params.blurb }} {{ with $page.Params.blurb }}
<div class="container-fluid"> <div class="container-fluid">
<div class="justify-content-center row"> <div class="justify-content-center row">
<div class="col col-auto col-lg-7 px-0"> <div class="col col-auto col-lg-7 px-0">
<p class="lead text-center">{{ . | markdownify }}</p> <p class="lead text-center">{{ . | markdownify }}</p>
</div>
</div> </div>
</div> </div>
</div>
{{ end }} {{ end }}
</section> </section>
{{ partial "paige/toc.html" $page }} {{ partial "paige/toc.html" $page }}

@ -1,68 +1,75 @@
{{ $page := . }} {{ $page := . }}
{{ $item := $page }} {{ $item := $page }}
{{ if $page.IsHome }} {{ if $page.IsHome }}
{{ $item = $page.Site }} {{ $item = $page.Site }}
{{ end }} {{ end }}
{{ $pages := slice }} {{ $pages := slice }}
{{ if or $page.IsHome $page.IsSection }} {{ if or $page.IsHome $page.IsSection }}
{{ $pages = $item.RegularPages }} {{ $pages = $item.RegularPages }}
{{ else }} {{ else }}
{{ $pages = $item.Pages }} {{ $pages = $item.Pages }}
{{ end }} {{ end }}
{{ $limit := $page.Site.Config.Services.RSS.Limit }} {{ $limit := $page.Site.Config.Services.RSS.Limit }}
{{ if ge $limit 1 }} {{ if ge $limit 1 }}
{{ $pages = $pages | first $limit }} {{ $pages = $pages | first $limit }}
{{ end }} {{ end }}
{{ $pages = where $pages "Params.paige.hide_rss" "ne" true }} {{ $pages = where $pages "Params.paige.hide_rss" "ne" true }}
{{ $title := partial "paige/func-title.html" $page }} {{ $title := partial "paige/func-title.html" $page }}
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
{{ with $page.OutputFormats.Get "RSS" }} {{ with $page.OutputFormats.Get "RSS" }}
{{ printf `<atom:link href="%s" rel="self" type="%s"/>` .Permalink .MediaType | safeHTML }} {{ printf `<atom:link href="%s" rel="self" type="%s"/>` .Permalink .MediaType | safeHTML }}
{{ end }} {{ end }}
{{ with $page.Site.Copyright }} {{ with $page.Site.Copyright }}
<copyright>{{ . }}</copyright> <copyright>{{ . }}</copyright>
{{ end }} {{ end }}
<description>{{ with $title }}{{ . }}{{ else }}Recent content{{ end }}</description> <description>{{ with $title }}{{ . }}{{ else }}Recent content{{ end }}</description>
{{ with $page.Site.LanguageCode | default .Site.Language.Lang }} {{ with $page.Site.LanguageCode | default .Site.Language.Lang }}
<language>{{ . }}</language> <language>{{ . }}</language>
{{ end }} {{ end }}
{{ if and $page.Date (not $page.Date.IsZero) }} {{ if and $page.Date (not $page.Date.IsZero) }}
<lastBuildDate>{{ $page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate> <lastBuildDate>{{ $page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
{{ end }} {{ end }}
<link>{{ $page.Permalink }}</link> <link>{{ $page.Permalink }}</link>
{{ with $page.Site.Params.paige.rss.managing_editor }} {{ with $page.Site.Params.paige.rss.managing_editor }}
<managingEditor>{{ . }}</managingEditor> <managingEditor>{{ . }}</managingEditor>
{{ end }} {{ end }}
{{ with $title }} {{ with $title }}
<title>{{ . }}</title> <title>{{ . }}</title>
{{ end }} {{ end }}
{{ with $page.Site.Params.paige.rss.web_master }} {{ with $page.Site.Params.paige.rss.web_master }}
<webMaster>{{ . }}</webMaster> <webMaster>{{ . }}</webMaster>
{{ end }} {{ end }}
{{ range $pages }} {{ range $pages }}
<item> <item>
{{ with partial "paige/func-authors.html" . }} {{ with partial "paige/func-authors.html" . }}
<author>{{ . }}</author> <author>{{ . }}</author>
{{ end }} {{ end }}
{{ if .Content }} {{ if .Content }}
<description>{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}</description> <description>{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}</description>
{{ else if .Description }} {{ else if .Description }}
<description>{{ .Description | markdownify | html }}</description> <description>{{ .Description | markdownify | html }}</description>
{{ end }} {{ end }}
{{ with .Permalink }} {{ with .Permalink }}
<guid>{{ . }}</guid> <guid>{{ . }}</guid>
<link>{{ . }}</link> <link>{{ . }}</link>
{{ end }} {{ end }}
{{ with .Date }} {{ with .Date }}
<pubDate>{{ .Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ end }} {{ end }}
{{ with .Title }} {{ with .Title }}
<title>{{ . | markdownify | plainify | htmlUnescape }}</title> <title>{{ . | markdownify | plainify | htmlUnescape }}</title>
{{ end }} {{ end }}
</item> </item>
{{ end }} {{ end }}
</channel> </channel>
</rss> </rss>

Loading…
Cancel
Save