prettify RSS feed

This commit is contained in:
Harsh Shandilya 2024-02-10 00:28:20 +05:30
parent 0a78dc8e88
commit 2f1d9f7994
3 changed files with 148 additions and 0 deletions

View File

@ -11,6 +11,7 @@
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
{{- printf "<?xml-stylesheet href=\"/pretty-feed-v3.xsl\" type=\"text/xsl\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ site.Title }}{{ end }}</title>

View File

@ -27,3 +27,9 @@ status = 200
from = "/sitemap.xml"
to = "/sitemap.xml"
status = 200
[[headers]]
for = "/pretty-feed-v3.xsl"
[headers.values]
Content-Type = "application/xml; charset=utf-8"
X-Content-Type-Options = "nosniff"

141
static/pretty-feed-v3.xsl Normal file

File diff suppressed because one or more lines are too long