blog

My blog at www.shimmy1996.com

git clone git://git.shimmy1996.com/blog.git
commit d3d3e2b7660b0b56fd0f68218fd4dc51299102a8
parent e2c462e703174f2ed7d956b08b9208d370727fd5
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sat, 30 Nov 2019 11:28:09 -0500

Add author information and Atom feed template

Diffstat:
Mconfig.toml | 1+
Alayouts/rss.xml | 18++++++++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/config.toml b/config.toml
@@ -11,6 +11,7 @@ disableHugoGeneratorInject     = true
 smartypants = false
 
 [params]
+author = "Shimmy Xu"
 soresuLatexOffByDefault = true
 soresuIssoHost = "/isso"
 
diff --git a/layouts/rss.xml b/layouts/rss.xml
@@ -0,0 +1,18 @@
+<feed xmlns="http://www.w3.org/2005/Atom">
+  <title>{{ .Site.Title }}</title>
+  <link href="{{ .Permalink }}"/>
+  <link href="{{ .Permalink }}index.xml" rel="self"/>
+  <updated>{{ .Lastmod.Format "2006-01-02" }}</updated>
+  <author><name>{{.Site.Params.Author}}</name></author>
+  <id>{{ .Permalink }}</id>
+  {{ range where .Site.RegularPages "Section" "!=" "" }}
+  <entry>
+    <id>{{ .Permalink }}</id>
+    {{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
+    <updated>{{ .Lastmod.Format "2006-01-02" }}</updated>
+    <author><name>{{.Site.Params.Author}}</name></author>
+    {{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
+    <link href="{{ .Permalink }}"/>
+  </entry>
+  {{ end }}
+</feed>