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

View File

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