Skip to content

Commit

Permalink
Fix for the regression in Hugo 0.58.0
Browse files Browse the repository at this point in the history
https://gohugo.io/news/0.58.0-relnotes/

> home.Pages now behaves like all the other sections, see #6240. If
you want to list all the regular pages, use .Site.RegularPages.
  • Loading branch information
kaushalmodi committed Feb 25, 2020
1 parent d5a9cb6 commit 5da913d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion layouts/_default/list.atom.xml
Expand Up @@ -66,7 +66,10 @@
{{- $limit := (cond (le site.Config.Services.RSS.Limit 0) 65536 site.Config.Services.RSS.Limit) }}
{{- $feed_sections := site.Params.feedSections | default site.Params.mainSections -}}
{{/* Range through only the pages with a Type in $feed_sections. */}}
{{- $pages := where .Pages "Type" "in" $feed_sections -}}
{{- $pages := where .RegularPages "Type" "in" $feed_sections -}}
{{- if (eq .Kind "home") -}}
{{- $pages = where site.RegularPages "Type" "in" $feed_sections -}}
{{- end -}}
{{/* Remove the pages that have the disable_feed parameter set to true. */}}
{{- $pages = where $pages ".Params.disable_feed" "!=" true -}}
{{- range first $limit $pages }}
Expand Down
2 changes: 1 addition & 1 deletion theme.toml
Expand Up @@ -5,7 +5,7 @@ description = "Hugo theme component for creating ATOM feeds for Hugo 'list' page
homepage = "https://scripter.co"
tags = ["component", "feed", "atom", "output-format"]
features = ["atom"]
min_version = "0.53"
min_version = "0.58"

[author]
name = "Kaushal Modi"
Expand Down

0 comments on commit 5da913d

Please sign in to comment.