bunteshaus.de/themes/buha/layouts/_default/term.atom.xml

40 lines
1.7 KiB
XML
Raw Normal View History

{{ $pages := .Data.Pages }}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ .Site.Title }}{{ with .Title }} - {{ if i18n "tag" }}{{ i18n "tag" }}{{ else }}{{ "Tag" }}{{ end -}}: {{.}}{{ end }}{{ end }}</title>
<link href="{{ .Permalink }}index.xml" rel="self"/>
<link href="{{ .Permalink }}"/>{{ if not .Date.IsZero }}
<updated>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>{{ end }}
<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 $pages.ByLastmod.Reverse }}
<entry>
{{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
<link href="{{ .Permalink }}"/>
<id>{{ .Permalink }}</id>{{ with $.Site.Author.name }}
<author>
<name>{{.}}</name>
</author>{{end}}
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
{{ if .Content }}
{{ `<content type="html"><![CDATA[` | safeHTML }}
{{ .Content }}
{{ $c := .Content }}
{{ $alink := .Permalink }}
{{ range .Resources.ByType "image" }}
{{ if and (not (in $c .Name)) (not (in .Name "banner")) }}
<a href="{{ $alink }}" class="article_image no_underline"> <img loading="lazy" src="{{ .Permalink }}" alt="{{ .Name }}" width=780 height="520" /><br> {{ .Name }} </a>
{{ end }}
{{ end }}
]]></content>
{{ end }}
</entry>{{ end }}
</feed>