From 354a4363432328f041bcae37ec6b501bedc101e2 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Thu, 13 Jun 2024 00:02:00 -0400 Subject: [PATCH] Make term.atom.xml a regular file For some reason (probably because of Go...) Hugo stopped supporting symbolic links. --- layouts/term/term.atom.xml | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) mode change 120000 => 100644 layouts/term/term.atom.xml diff --git a/layouts/term/term.atom.xml b/layouts/term/term.atom.xml deleted file mode 120000 index 69c0ebb..0000000 --- a/layouts/term/term.atom.xml +++ /dev/null @@ -1 +0,0 @@ -../index.atom.xml \ No newline at end of file diff --git a/layouts/term/term.atom.xml b/layouts/term/term.atom.xml new file mode 100644 index 0000000..1e045ca --- /dev/null +++ b/layouts/term/term.atom.xml @@ -0,0 +1,37 @@ +{{- $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 -}} + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + + {{ if not .Date.IsZero }} + {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}{{ end }} + {{ .Permalink }}{{ with .Site.Params.Author.name }} + + {{.}}{{ with $.Site.Params.Author.email }} + {{.}}{{end}} + {{end}} + Hugo -- gohugo.io{{ range $pages }} + + {{ `<![CDATA[` | safeHTML }}{{ .Title }}]]> + + {{ .Permalink }}{{ with $.Site.Params.Author.name }} + + {{.}} + {{end}} + {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} + {{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }} + {{ if .Content }} + {{ ` + {{ end }} + {{ end }} +