diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-08 21:30:23 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-08 21:30:23 +0800 |
| commit | bce6be90883b107285faa56acf0081b54daa3aa9 (patch) | |
| tree | 0893f99b5debe074f1596b6cfc6d3c86da34ca42 /layouts/home.rss.xml | |
Initialize personal website
Diffstat (limited to 'layouts/home.rss.xml')
| -rw-r--r-- | layouts/home.rss.xml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/layouts/home.rss.xml b/layouts/home.rss.xml new file mode 100644 index 0000000..8ec9c25 --- /dev/null +++ b/layouts/home.rss.xml @@ -0,0 +1,21 @@ +{{- $pages := where site.RegularPages "Section" "journal" -}} +{{- $pages = $pages.ByDate.Reverse -}} +{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>{{ site.Title }}</title> + <link>{{ .Permalink }}</link> + <description>{{ site.Params.description }}</description> + <language>en</language> + <atom:link href="{{ "rss.xml" | absURL }}" rel="self" type="application/rss+xml" /> + {{- range $pages }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <guid isPermaLink="true">{{ .Permalink }}</guid> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</pubDate> + <description>{{ .Content | transform.XMLEscape | safeHTML }}</description> + </item> + {{- end }} + </channel> +</rss> |
