diff --git a/layouts/_default/index.atom.xml b/layouts/_default/index.atom.xml new file mode 100644 index 0000000..c891a9d --- /dev/null +++ b/layouts/_default/index.atom.xml @@ -0,0 +1,28 @@ +{{- $pctx := . -}} +{{- if .IsHome -}} {{ $pctx = .Site }} {{- end -}} +{{- $pages := slice -}} +{{- if or $.IsHome $.IsSection -}} + {{- $pages = $pctx.RegularPages -}} +{{- else -}} + {{- $pages = $pctx.Pages -}} +{{- end -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}} +{{ printf "" | safeHTML }} + + {{ .Site.Title }} + + + {{ if not .Date.IsZero }}{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}{{ end }} + {{ .Permalink }} + {{ with .Site.Author.name }} + + {{ . }} + {{ with $.Site.Author.email }}{{ . }}{{ end }} + {{ $.Site.Home.Permalink }} + + {{ end }} + Hugo {{ hugo.Version }} + © {{ now.Year }} Eryn Wells + {{ range $pages }}{{ .Render "atom_entry" }}{{ end }} + diff --git a/layouts/blog/atom_entry.xml b/layouts/blog/atom_entry.xml new file mode 100644 index 0000000..70fbef9 --- /dev/null +++ b/layouts/blog/atom_entry.xml @@ -0,0 +1,6 @@ + + {{ partial "atom_entry_metadata.xml" . }} + {{- if .Content -}} + {{ ` + {{- end -}} + diff --git a/layouts/partials/atom_entry_metadata.xml b/layouts/partials/atom_entry_metadata.xml new file mode 100644 index 0000000..97c5486 --- /dev/null +++ b/layouts/partials/atom_entry_metadata.xml @@ -0,0 +1,11 @@ +{{ .Title }} +{{ .Permalink }} +{{ with .Site.Author.name }}{{ . }}{{ end }} +{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} +{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }} +{{- range slice "series" "categories" "tags" -}} + {{- range $.GetTerms . -}} + {{ $scheme := (.Site.GetPage (printf "/%s" .Section)).Permalink }} + + {{- end -}} +{{- end -}} diff --git a/layouts/photos/atom_entry.xml b/layouts/photos/atom_entry.xml new file mode 100644 index 0000000..57fc1a7 --- /dev/null +++ b/layouts/photos/atom_entry.xml @@ -0,0 +1,8 @@ +{{- $thumbnail := partial "images/photo_thumbnail.html" . -}} + + {{ partial "atom_entry_metadata.xml" . }} + + {{ if .Content }} + {{ ` + {{ end }} +