2022-02-06 20:53:22 +00:00
|
|
|
{{ printf `<?xml version="1.0" encoding="utf-8"?>` | safeHTML }}
|
2020-07-12 14:28:51 +00:00
|
|
|
<feed xmlns="http://www.w3.org/2005/Atom"{{ with .Site.Language.Lang }} xml:lang="{{ . }}"{{ end }}>
|
|
|
|
<generator uri="https://gohugo.io/" version="{{ hugo.Version }}">Hugo</generator>
|
|
|
|
{{- $title := .Site.Title -}}
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- if not (eq .Kind "home") }}
|
2022-02-06 11:46:10 +00:00
|
|
|
{{- $title = printf `%s on %s` (partial "utils/title" .) $title -}}
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- end }}
|
2022-02-14 21:58:34 +00:00
|
|
|
<title>{{ $title }}</title>
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- with .Site.Params.subtitle }}
|
2022-02-14 21:58:34 +00:00
|
|
|
<subtitle>{{ . }}</subtitle>
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- $output_formats := .OutputFormats -}}
|
|
|
|
{{- range $output_formats -}}
|
2020-07-12 14:28:51 +00:00
|
|
|
{{- $rel := (or (and (eq "atom" (.Name | lower)) "self") "alternate") -}}
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- with $output_formats.Get .Name }}
|
2020-07-12 14:28:51 +00:00
|
|
|
{{ printf `<link href=%q rel=%q type=%q title=%q />` .Permalink $rel .MediaType.Type .Name | safeHTML }}
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- end }}
|
2020-07-12 14:28:51 +00:00
|
|
|
{{- end }}
|
|
|
|
<updated>{{ now.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
|
2023-06-22 08:52:32 +00:00
|
|
|
{{- with .Site.Params.geekblogAuthor -}}
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- with index $.Site.Data.authors . }}
|
2020-07-12 14:28:51 +00:00
|
|
|
<author>
|
|
|
|
<name>{{ .name }}</name>
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- with .email }}
|
2020-07-12 14:28:51 +00:00
|
|
|
<email>{{ . }}</email>
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- end }}
|
2020-07-12 14:28:51 +00:00
|
|
|
</author>
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- end }}
|
2020-07-12 14:28:51 +00:00
|
|
|
{{- end }}
|
|
|
|
<id>{{ .Permalink }}</id>
|
|
|
|
{{- $pages := where .RegularPages "Type" "in" .Site.Params.mainSections -}}
|
|
|
|
{{- if (eq .Kind "home") -}}
|
|
|
|
{{- $pages = where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
|
|
|
|
{{- end -}}
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- range $page := $pages }}
|
2020-07-12 14:28:51 +00:00
|
|
|
<entry>
|
2022-02-14 21:58:34 +00:00
|
|
|
<title>{{ partial "utils/title" . }}</title>
|
2022-02-06 20:53:22 +00:00
|
|
|
<link href="{{ .Permalink }}" rel="alternate" type="text/html" {{ with .Site.Language.Lang }} hreflang="{{ . }}"{{ end }} />
|
2020-07-12 14:28:51 +00:00
|
|
|
<id>{{ .Permalink }}</id>
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- with .Params.authors }}
|
|
|
|
{{- range sort . }}
|
|
|
|
{{- $author := index $.Site.Data.authors . }}
|
2020-07-12 14:28:51 +00:00
|
|
|
<author>
|
|
|
|
<name>{{ $author.name }}</name>
|
|
|
|
</author>
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- end }}
|
2020-07-12 14:28:51 +00:00
|
|
|
{{- 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>
|
2022-02-06 15:59:16 +00:00
|
|
|
{{- $img := "" -}}
|
|
|
|
{{- with ($page.Resources.ByType "image").GetMatch "{*feature*,*cover*,*thumbnail*}" }}
|
|
|
|
{{- $featured := .Fill (printf "910x280 %s" (default "Smart" .Params.anchor)) -}}
|
|
|
|
{{- $img = printf `<img src="%s" width="%d" height="%d" alt="%s" /><br/>` $featured.Permalink $featured.Width $featured.Height (default (partial "utils/title" $page) .Params.description) -}}
|
|
|
|
{{- end }}
|
2022-02-06 20:53:22 +00:00
|
|
|
<content type="html">
|
|
|
|
{{ printf "%s%s" $img .Content | htmlEscape | safeHTML }}
|
|
|
|
</content>
|
|
|
|
{{- with .Site.Taxonomies }}
|
|
|
|
{{- range $taxo,$_ := . }} <!-- Defaults taxos: "tags", "categories" -->
|
|
|
|
{{- with $page.Param $taxo }}
|
|
|
|
{{- $taxo_list := . -}} <!-- $taxo_list will be the tags/categories list -->
|
|
|
|
{{- with $.Site.GetPage (printf "/%s" $taxo) }}
|
|
|
|
{{- $taxonomy_page := . -}}
|
|
|
|
{{- range $taxo_list }} <!-- Below, assuming pretty URLs -->
|
2020-07-12 14:28:51 +00:00
|
|
|
<category scheme="{{ printf "%s%s" $taxonomy_page.Permalink (. | urlize) }}" term="{{ (. | urlize) }}" label="{{ . }}" />
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2020-07-12 14:28:51 +00:00
|
|
|
</entry>
|
2022-02-06 20:53:22 +00:00
|
|
|
{{- end }}
|
2020-07-12 14:28:51 +00:00
|
|
|
</feed>
|