Skip to content

Commit a49110d

Browse files
committed
Explicitly specify types for recent pages overview and RSS feed.
1 parent 9024ff1 commit a49110d

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pluralizeListTitles: false
99
metadataFormat: yaml
1010
params:
1111
stylesheets: [ "bootstrap.css", "font-awesome.css", "custom.css" ]
12+
recentTypes: [ "news", "wiki" ]
1213
author:
1314
name: The Bufferbloat community
1415

layouts/partials/menu.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<h4>Recent News &amp; Articles</h4>
1010
</div>
1111
<div class="panel-body">
12-
{{ range first 5 .Site.Pages.ByDate.Reverse }}
12+
{{ range first 5 (where .Site.Pages.ByDate.Reverse "Type" "in" .Site.Params.recentTypes)}}
1313
{{ .Render "title" }}
1414
{{ end }}
1515
</div>

layouts/rss.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<channel>
33
<title>{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}</title>
44
<link>{{ .Permalink }}</link>
5-
<description>Recent news {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }}</description>
5+
<description>Recent news and articles {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }}</description>
66
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
77
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
88
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
99
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
1010
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
1111
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
1212
<atom:link href="{{.URL}}" rel="self" type="application/rss+xml" />
13-
{{ range first 15 (where .Site.Pages.ByDate.Reverse "Type" "=" "news") }}
13+
{{ range first 15 (where .Site.Pages.ByDate.Reverse "Type" "in" .Site.Params.recentTypes) }}
1414
<item>
1515
<title>{{ .Title }}</title>
1616
<link>{{ .Permalink }}</link>

0 commit comments

Comments
 (0)