{{- if or (.IsHome) (in .Site.Params.mainMenu .Section) -}} {{- $title := .Site.Title -}} {{- $desc := "" -}} {{- $i18n_section := i18n "news" -}} {{- if .IsHome -}} {{- $desc = printf "Aktuelle Informationen vom %s" $title -}} {{- $title = printf "%s: %s" $title $i18n_section -}} {{ else if in .Site.Params.mainMenu .Section }} {{- $desc = printf "Aktuelle Informationen vom %s" .Site.Title -}} {{ $i18n_section = i18n .Section }} {{- $title = printf "%s: %s" .Site.Title $i18n_section -}} {{- end -}} {{- $pages := where (where site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections -}} {{- if eq .Section "events" -}} {{- $pages = where $pages ".Params.when" "ne" nil -}} {{- end -}} {{- printf "" | safeHTML }} {{ $title }} {{ .Permalink }} {{- $desc -}} Hugo -- gohugo.io{{ with .Site.LanguageCode }} {{.}}{{end}}{{ with .Site.Author.email }} {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" -}} {{ printf "" .Permalink .MediaType | safeHTML }} {{- end -}} {{ range $pages }} {{ if or (eq .Lastmod .Date) (gt .Lastmod (.Date.AddDate 0 0 -1)) }} {{ $when := .Params.when }} {{ $about := .Params.about }} {{ $covid := .Params.covid }} {{ $contact := .Params.contact }} {{ $price := .Params.price }} {{ $featured := .Params.featured }} {{ $categories := slice }} {{ range .Params.categories }} {{ $categories = $categories | append . }} {{ end }} {{ $events := slice }} {{ range .Params.events }} {{ $events = $events | append . }} {{ end }} {{ $tags := slice }} {{ range .Params.tags }} {{ $tags = $tags | append . }} {{ end }} {{ $images := slice }} {{ $hash := slice $when $about $categories $events $covid $contact $price $featured $tags .Date .Lastmod .Title .Content }} {{ $hash = delimit $hash ", " }} {{ $hash = md5 $hash }} {{ .Title }} {{ .Permalink }} {{ .Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }}-{{ $hash }} {{- $c := .Content -}} {{- $summary := "" -}} {{- if in .RawContent "" -}} {{- $tmp := split .RawContent "" -}} {{- $c = index $tmp 0 | markdownify -}} {{- else if $c -}} {{- if hasPrefix .Summary "

" -}} {{- $c = .Summary -}} {{- else -}} {{- $c = printf "

%s

" .Summary -}} {{- end -}} {{- end -}} {{- $banner := .Resources.GetMatch "banner*" -}} {{- if $banner -}} {{- $c = printf "

%s" $banner.Permalink $banner.Width $banner.Height $c -}} {{- end -}} {{- if $when -}} {{- $c = printf "

%s

%s" $when $c -}} {{- end -}} {{- range .Resources.ByType "image" -}} {{- $img := . -}} {{- if not (hasPrefix $img.Name "banner") }} {{- $c = printf "%s

" $c $img.Permalink $img.Width $img.Height -}} {{- end -}} {{- end -}} {{- printf "" ($c | safeHTML) -}} {{- end -}}
{{ end }}
{{- end -}}