second attempt at RSS
This commit is contained in:
parent
18b4f9d678
commit
b3ca054e39
@ -11,6 +11,12 @@ enableInlineShortcodes = true
|
|||||||
enableGitInfo = true
|
enableGitInfo = true
|
||||||
canonifyurls = true
|
canonifyurls = true
|
||||||
|
|
||||||
|
[frontmatter]
|
||||||
|
date = ["date", "publishDate", "lastmod"]
|
||||||
|
lastmod = [":fileModTime", "lastmod", ":git", "publishDate"]
|
||||||
|
publishDate = ["publishDate", "date"]
|
||||||
|
expiryDate = ["expiryDate"]
|
||||||
|
|
||||||
[markup]
|
[markup]
|
||||||
[markup.goldmark.renderer]
|
[markup.goldmark.renderer]
|
||||||
unsafe= true
|
unsafe= true
|
||||||
|
@ -34,53 +34,35 @@
|
|||||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ range $pages }}
|
{{ range $pages }}
|
||||||
{{ if or (eq .Title "Links") (eq .Title "Videos") }}<!-- do nothing -->
|
|
||||||
{{else}}
|
|
||||||
<item>
|
<item>
|
||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||||
|
<guid>{{ .Permalink }}</guid>
|
||||||
|
|
||||||
|
{{ if isset .Params "image" }}
|
||||||
|
{{ with .Params.image }}
|
||||||
|
<enclosure url="{{ $.Site.Params.blogCdnUrl }}{{ . }}" type="image/jpg"/>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<!-- *** THE ENCLOSURE PARAMETER WILL BE TREATED AS A SIGNAL THAT THIS IS A PODCAST *** -->
|
|
||||||
{{ if isset .Params "enclosure" }}
|
|
||||||
{{ $cdnUrl := .Site.Params.podcastCdnUrl }}
|
|
||||||
<category>Podcast: {{.Params.series }}</category>
|
|
||||||
<enclosure url="{{$cdnUrl}}{{.Params.enclosure}}" type="audio/mpeg"/>
|
|
||||||
<description>
|
<description>
|
||||||
{{`<![CDATA[ ` | safeHTML }}
|
{{`<![CDATA[ ` | safeHTML }}
|
||||||
{{ if isset .Params "image" }}
|
{{ if isset .Params "image" }}<p><img src="{{ $.Site.Params.blogCdnUrl }}{{ with .Params.image }}{{.}}{{ end }}"/></p>{{end}}
|
||||||
<p><img src="{{ $cdnUrl }}{{ with .Params.image }}{{.}}{{ end }}"/></p>{{end}}
|
|
||||||
{{ .Summary | safeHTML }}
|
{{ .Summary | safeHTML }}
|
||||||
]]>
|
]]>
|
||||||
</description>
|
</description>
|
||||||
<content:encoded>
|
<content:encoded>
|
||||||
{{`<![CDATA[ ` | safeHTML }}
|
{{`<![CDATA[ ` | safeHTML }}
|
||||||
|
{{ if isset .Params "image" }}
|
||||||
|
{{ $cdnUrl := .Site.Params.blogCdnUrl }}
|
||||||
<p><img src="{{ $cdnUrl }}{{ with .Params.image }}{{.}}{{ end }}"/></p>
|
<p><img src="{{ $cdnUrl }}{{ with .Params.image }}{{.}}{{ end }}"/></p>
|
||||||
|
{{end}}
|
||||||
{{ .Content | safeHTML }}
|
{{ .Content | safeHTML }}
|
||||||
]]>
|
]]>
|
||||||
</content:encoded>
|
</content:encoded>
|
||||||
{{ else }}
|
|
||||||
{{ if isset .Params "topic" }}<category>Reading: {{ .Params.topic }}</category>
|
|
||||||
{{else}}
|
|
||||||
<category>Blog: {{.Params.topics }}</category>
|
|
||||||
{{ end }}
|
|
||||||
{{ if isset .Params "image" }}
|
|
||||||
{{ $cdnUrl := .Site.Params.blogCdnUrl }}
|
|
||||||
{{ with .Params.image }}<enclosure url="{{ $cdnUrl }}{{ . }}" type="image/jpg"/>{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
<enclosure url="https://gmgauthier.us-east-1.linodeobjects.com/blog/img/blue-gray-code.jpg" type="image/jpg"/>
|
|
||||||
{{ end }}
|
|
||||||
<description>
|
|
||||||
{{`<![CDATA[ ` | safeHTML }}
|
|
||||||
{{ $cdnUrl := .Site.Params.blogCdnUrl }}
|
|
||||||
{{ if isset .Params "image" }}<p><img src="{{ $cdnUrl }}{{ with .Params.image }}{{.}}{{ end }}"/></p>{{ end }}
|
|
||||||
{{ .Summary | safeHTML }}
|
|
||||||
]]>
|
|
||||||
</description>
|
|
||||||
{{ end }} <!-- IF ENCLOSURE / ELSE -->
|
|
||||||
</item>
|
</item>
|
||||||
{{ end }} <!-- if contact or about -->
|
{{ end }}
|
||||||
{{ end }} <!-- RANGE -->
|
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
Loading…
Reference in New Issue
Block a user