Skip to content

Commit

Permalink
prettify RSS feed
Browse files Browse the repository at this point in the history
  • Loading branch information
msfjarvis committed Feb 9, 2024
1 parent 0a78dc8 commit 2f1d9f7
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 0 deletions.
1 change: 1 addition & 0 deletions layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 141 additions & 0 deletions static/pretty-feed-v3.xsl

Large diffs are not rendered by default.

0 comments on commit 2f1d9f7

Please sign in to comment.