ybbond

My site. The main domain
Log | Files | Refs | README | LICENSE | CC-LICENSE

rss.xml (2051B)


      1 {{- $pctx := . -}}
      2 {{- if .IsHome -}}
      3   {{ $pctx = .Site }}
      4 {{- end -}}
      5 {{- $pages := slice -}}
      6 {{- if or $.IsHome $.IsSection -}}
      7   {{- $pages = $pctx.RegularPages -}}
      8 {{- else -}}
      9   {{- $pages = $pctx.Pages -}}
     10 {{- end -}}
     11 {{- $limit := .Site.Config.Services.RSS.Limit -}}
     12 {{- if ge $limit 1 -}}
     13   {{- $pages = $pages | first $limit -}}
     14 {{- end -}}
     15 {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
     16 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
     17   <channel>
     18     <title>YBBond's Responses</title>
     19     <link>{{ .Permalink }}</link>
     20     <description>Recent content {{ if ne  .Title  .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
     21     <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
     22     <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
     23     <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
     24     <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
     25     <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
     26     <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
     27     {{ with .OutputFormats.Get "RSS" }}
     28   {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
     29     {{ end }}
     30     {{ range $pages }}
     31     {{ $dateformat := .Date.Format "2006-01-02 15:04" }}
     32     {{ $idslug := (print "date-" $dateformat "-") | urlize }}
     33     <item>
     34       <title>{{ .Title }}</title>
     35       <link>{{ .Site.BaseURL }}responses/{{ $idslug }}</link>
     36       <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
     37       {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
     38       <guid isPermaLink="true">{{ .Site.BaseURL }}responses/{{ $idslug }}</guid>
     39       <description>{{ .Content | html }}</description>
     40     </item>
     41     {{ end }}
     42   </channel>
     43 </rss>