github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/doc/themes/docsy/layouts/_default/list.rss.xml (about)

     1  <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
     2    <channel>
     3      <title>{{ .Site.Title }} – {{ .Title }}</title>
     4      <link>{{ .Permalink }}</link>
     5      <description>Recent content {{ if ne  .Title  .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
     6      <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
     7      <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
     8      <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
     9      <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
    10      <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
    11      <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
    12      {{ with .OutputFormats.Get "RSS" }}
    13  	  {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
    14      {{ end }}
    15      {{ if not $.Section }}
    16        {{ $sections := .Site.Params.rss_sections | default (slice "blog") }}
    17        {{ .Scratch.Set "rss_pages" (first 50 (where $.Site.RegularPages "Type" "in" $sections )) }}
    18      {{ else }}
    19        {{ if $.Parent.IsHome }}
    20          {{ .Scratch.Set "rss_pages" (first 50 (where $.Site.RegularPages "Type" $.Section )) }}
    21        {{ else }}
    22          {{ .Scratch.Set "rss_pages" (first 50 $.Pages) }}
    23        {{ end }}
    24      {{ end }}
    25      {{ range (.Scratch.Get "rss_pages")  }}
    26      <item>
    27        <title>{{ .Section | title }}: {{ .Title }}</title>
    28        <link>{{ .Permalink }}</link>
    29        <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
    30        {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
    31        <guid>{{ .Permalink }}</guid>
    32        <description>
    33          {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
    34          {{ with $img }}
    35          {{ $img := .Resize "640x" }}
    36          {{ printf "<![CDATA[<img src=\"%s\" width=\"%d\" height=\"%d\"/>]]>" $img.Permalink $img.Width $img.Height | safeHTML }}
    37          {{ end }}
    38          {{ .Content | html }}
    39        </description>
    40      </item>
    41      {{ end }}
    42    </channel>
    43  </rss>