jon.kelbie.scot website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
5.3 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  2. <channel>
  3. <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</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 eq (trim .Permalink "index.xml") (string .Site.BaseURL)}}
  16. {{ range .Site.RegularPages }}
  17. <item>
  18. <title>{{ .Title }} | {{ .Summary | htmlUnescape}}</title>
  19. <link>{{ .Permalink }}</link>
  20. {{ if eq .Params.posttype "in-reply-to" }}<link>{{ index .Params "in-reply-to" }}</link>{{ end }}
  21. {{ if eq .Params.posttype "like-of" }}<link>{{ index .Params "like-of" }}</link>{{ end }}
  22. {{ if eq .Params.posttype "repost-of" }}<link>{{ index .Params "repost-of" }}</link>{{ end }}
  23. <description>
  24. {{ .Content | plainify }}
  25. ({{ .Permalink }})
  26. </description>
  27. {{ if eq .Params.posttype "article" }}
  28. {{ if not ( in .Params.image "http" ) }}
  29. <media:content xmlns:media="http://search.yahoo.com/mrss" url="https://jon.kelbie.scot{{.Params.image}}" medium="image" type="image/jpeg"/>
  30. <media:description xmlns:media="http://search.yahoo.com/mrss">{{.Params.imagealt}}</media:description>
  31. {{ else }}
  32. <media:content xmlns:media="http://search.yahoo.com/mrss" url="{{.Params.image}}" medium="image" type="image/jpeg"/>
  33. <media:description xmlns:media="http://search.yahoo.com/mrss">{{.Params.imagealt}}</media:description>
  34. {{ end }}
  35. {{ end }}
  36. {{ range .Page.Params.Photo }}
  37. {{ if isset . "value" }}
  38. {{ if not ( in . "http" ) }}
  39. <media:content xmlns:media="http://search.yahoo.com/mrss" url="https://jon.kelbie.scot{{.value}}" medium="image" type="image/jpeg"/>
  40. <media:description xmlns:media="http://search.yahoo.com/mrss">{{.alt}}</media:description>
  41. {{ else }}
  42. <media:content xmlns:media="http://search.yahoo.com/mrss" url="{{.value}}" medium="image" type="image/jpeg"/>
  43. <media:description xmlns:media="http://search.yahoo.com/mrss">{{.alt}}</media:description>
  44. {{ end }}
  45. {{ end }}{{ end }}
  46. <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
  47. {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
  48. <guid>{{ .Permalink }}</guid>
  49. </item>
  50. {{ end }}
  51. {{else}}
  52. {{ range .Pages}}
  53. <item>
  54. <title>{{ .Title }} | {{ .Summary | htmlUnescape}}</title>
  55. <link>{{ .Permalink }}</link>
  56. {{ if eq .Params.posttype "in-reply-to" }}<link>{{ index .Params "in-reply-to" }}</link>{{ end }}
  57. {{ if eq .Params.posttype "like-of" }}<link>{{ index .Params "like-of" }}</link>{{ end }}
  58. {{ if eq .Params.posttype "repost-of" }}<link>{{ index .Params "repost-of" }}</link>{{ end }}
  59. <description>
  60. {{ .Content | plainify }}
  61. ({{ .Permalink }})
  62. </description>
  63. {{ if eq .Params.posttype "article" }}
  64. {{ $image := delimit .Params.image " " | safeHTML }}
  65. {{ if not ( in $image "https" ) }}
  66. <media:content xmlns:media="http://search.yahoo.com/mrss" url="https://jon.kelbie.scot{{$image}}" medium="image" type="image/jpeg"/>
  67. <media:description xmlns:media="http://search.yahoo.com/mrss">{{.Params.imagealt}}</media:description>
  68. {{ else }}
  69. <media:content xmlns:media="http://search.yahoo.com/mrss" url="{{$image}}" medium="image" type="image/jpeg"/>
  70. <media:description xmlns:media="http://search.yahoo.com/mrss">{{.Params.imagealt}}</media:description>
  71. {{ end }}
  72. {{ end }}
  73. {{ range .Page.Params.Photo }}
  74. {{ if isset . "value" }}
  75. {{ if not ( in . "http" ) }}
  76. <media:content xmlns:media="http://search.yahoo.com/mrss" url="https://jon.kelbie.scot{{.value}}" medium="image" type="image/jpeg"/>
  77. <media:description xmlns:media="http://search.yahoo.com/mrss">{{.alt}}</media:description>
  78. {{ else }}
  79. <media:content xmlns:media="http://search.yahoo.com/mrss" url="{{.value}}" medium="image" type="image/jpeg"/>
  80. <media:description xmlns:media="http://search.yahoo.com/mrss">{{.alt}}</media:description>
  81. {{ end }}
  82. {{ end }}{{ end }}
  83. <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
  84. {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
  85. <guid>{{ .Permalink }}</guid>
  86. </item>
  87. {{ end }}{{ end }}
  88. </channel>
  89. </rss>