I think rss is working now

This commit is contained in:
Greg Gauthier 2023-01-25 14:49:03 +00:00
parent 1a3a16f1a7
commit da242991b7
2 changed files with 6 additions and 14 deletions

View File

@ -1,7 +1,10 @@
<head>
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<!-- RSS -->
{{ if .OutputFormats.Get "RSS" }}
<link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}"
href='{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}' />
{{ end }}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{{ $css := "css/index.css" | relURL }}

View File

@ -41,24 +41,13 @@
{{ 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 }}
<description>
{{`<![CDATA[ ` | safeHTML }}
{{ if isset .Params "image" }}<p><img src="{{ $.Site.Params.blogCdnUrl }}{{ with .Params.image }}{{.}}{{ end }}"/></p>{{end}}
{{ .Summary | safeHTML }}
]]>
</description>
<content:encoded>
{{`<![CDATA[ ` | safeHTML }}
{{ if isset .Params "image" }}
{{ $cdnUrl := .Site.Params.blogCdnUrl }}
<p><img src="{{ $cdnUrl }}{{ with .Params.image }}{{.}}{{ end }}"/></p>
{{end}}
{{ .Content | safeHTML }}
]]>
</content:encoded>