Commit bddb6293 authored by Laura Kalbag's avatar Laura Kalbag
Browse files

Tweak RSS feed to display lens posts better

parent 8a5f740a
......@@ -2,7 +2,7 @@
{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- else -}}{{- $pages = .Pages -}}{{- end -}}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ .Site.Title }}’s {{ if eq .Type "photos" }}Photos{{ else if eq .Type "notes" }}Notes{{ else if eq .Title "Home" }}Blog Posts, Photos and Notes{{ else }}Blog Posts{{ end }}</title>
<title>{{ .Site.Title }}’s {{ if eq .Type "photos" }}Photos{{ else if eq .Type "lens" }}Lens: Recommended Reads{{ else if eq .Type "notes" }}Notes{{ else if eq .Title "Home" }}Blog Posts, Photos and Notes{{ else }}Blog Posts{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>{{ if eq .Title "Home" }}All the recent{{ else }}Recent{{ end }} {{ if eq .Type "photos" }}photos {{ else if eq .Type "notes" }}notes {{ else }}posts {{ end }}on laurakalbag.com</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
......@@ -15,6 +15,16 @@
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range $pages }}
{{ if eq .Type "lens" }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Params.postURL }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Params.writer }}<author>{{.}}</author>{{end}}
<guid>{{ .Params.postURL }}</guid>
<description>{{ .Content | html }}&lt;p&gt;&lt;a href=&#34;{{ .Permalink }}&#34;&gt;Read the original post, &#39;{{ .Title }}&#39;&lt;/a&gt;.&lt;/p&gt;</description>
</item>
{{ else }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
......@@ -24,5 +34,6 @@
<description>{{ .Content | html }}&lt;p&gt;&lt;a href=&#34;{{ .Permalink }}&#34;&gt;Read the original post, &#39;{{ .Title }}&#39;&lt;/a&gt;.&lt;/p&gt;</description>
</item>
{{ end }}
{{ end }}
</channel>
</rss>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment