Attempt to add an RSS feed image

This commit is contained in:
Will Webberley 2023-03-26 11:36:45 +00:00
parent 07ef3437cf
commit 7034b1c7c4

View File

@ -1,15 +1,21 @@
{{- $pages := ( where .Site.RegularPages "Type" "blog") -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- $siteBase := .Permalink -}}
{{- $title := "Will Webberley's Blog" -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>Will Webberley's Blog</title>
<title>{{ $title }}</title>
<link>{{ .Permalink }}</link>
<description>A collection of all of my blog posts.</description>
<image>
<url>{{ .Permalink }}media/icon.png</url>
<link>{{ .Permalink}}</link>
<title>{{ $title }}</title>
</image>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}
<managingEditor>blog@wilw.dev (Will Webberley)</managingEditor>