about summary refs log tree commit diff
path: root/users/fcuny/notes/layouts/index.atom.xml
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-03-07 16:23:59 -0800
committerFranck Cuny <franck@fcuny.net>2021-03-07 16:23:59 -0800
commita3f8e661ad54cfec14ca671ea671e728ffc9bb91 (patch)
tree311e573cd5669a07a88b630f906a66ff0aa52d85 /users/fcuny/notes/layouts/index.atom.xml
downloadworld-a3f8e661ad54cfec14ca671ea671e728ffc9bb91.tar.gz
initial site with hugo
Start my website from scratch once more, using hugo to generate it. For
now the layout is pretty simple:
- an index page that will list future notes
- notes should be created under the "content" directory

The theme is custom and I'll try to keep this simple.
Diffstat (limited to 'users/fcuny/notes/layouts/index.atom.xml')
-rw-r--r--users/fcuny/notes/layouts/index.atom.xml22
1 files changed, 22 insertions, 0 deletions
diff --git a/users/fcuny/notes/layouts/index.atom.xml b/users/fcuny/notes/layouts/index.atom.xml
new file mode 100644
index 0000000..531e77c
--- /dev/null
+++ b/users/fcuny/notes/layouts/index.atom.xml
@@ -0,0 +1,22 @@
+<feed xmlns="http://www.w3.org/2005/Atom">
+  <title>Franck Cuny Website</title>
+  <link href="{{ .Permalink }}feed.xml" rel="self"/>
+  <link href="{{ .Permalink }}"/>
+  <id>{{ .Permalink }}</id>{{ with .Site.Author.name }}
+  <author>
+    <name>{{.}}</name>{{ with $.Site.Author.email }}
+    <email>{{.}}</email>{{end}}
+  </author>{{end}}
+  <generator>Hugo -- gohugo.io</generator>{{ range where (first 10 (where .Site.Pages "Section" "posts")) "Params.hidden" "ne" "true" }}
+  <entry>
+    {{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
+    <link href="{{ .Permalink }}"/>
+    <id>{{ .Permalink }}</id>{{ with .Site.Params.Author }}
+    <author>
+      <name>{{.}}</name>
+    </author>{{end}}
+    {{- $fmt := "2006-01-02T15:04:05-07:00" }}
+    <published>{{ .Date.Format $fmt | safeHTML }}</published>
+    {{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
+  </entry>{{ end }}
+</feed>