diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 259bc304cd..4951500e19 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,8 +1,6 @@ {{- partialCached "page-meta.hugo" . .RelPermalink }} {{- $pages := .Page.Pages }} -{{- if .Page.IsHome }} - {{- $pages = .Page.Sections }} -{{- else if .Page.Sections}} +{{- if .Page.Sections}} {{- $pages = (.Page.Pages | union .Page.Sections) }} {{- end }} {{- $limit := .Site.Config.Services.RSS.Limit -}} diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index da89791dc4..7e619c4a9d 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -29,11 +29,11 @@ {{- $currentOrdersectionsby := .Site.Home.Params.ordersectionsby | default $defaultOrdersectionsby }} {{- $defaultAlwaysopen := .Site.Params.alwaysopen | default false }} {{- if eq $currentOrdersectionsby "title" }} - {{- range .Site.Home.Sections.ByTitle }} + {{- range .Site.Home.Pages.ByTitle }} {{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks "alwaysopen" $defaultAlwaysopen }} {{- end }} {{- else }} - {{- range .Site.Home.Sections.ByWeight }} + {{- range .Site.Home.Pages.ByWeight }} {{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks "alwaysopen" $defaultAlwaysopen }} {{- end }} {{- end }} @@ -134,9 +134,7 @@ {{- $isAncestor := and (not $isSelf) (.IsAncestor $currentNode) }} {{- $isActive := $isSelf }} {{- $pages := .Pages }} - {{- if .Page.IsHome }} - {{- $pages = .Sections }} - {{- else if .Page.Sections}} + {{- if .Sections}} {{- $pages = (.Pages | union .Sections) }} {{- end }} {{- $relearnIsHiddenFrom := index ($currentNode.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }} diff --git a/layouts/partials/nested-article.hugo b/layouts/partials/nested-article.hugo index c52315ddbb..0b5aceac4f 100644 --- a/layouts/partials/nested-article.hugo +++ b/layouts/partials/nested-article.hugo @@ -14,7 +14,10 @@ {{- end }} {{- end }} {{- end }} - {{- $pages := .Site.Home.Sections }} + {{- $pages := .Site.Home.Pages }} + {{- if .Site.Home.Sections}} + {{- $pages = (.Site.Home.Pages | union .Site.Home.Sections) }} + {{- end }} {{- $defaultOrdersectionsby := .Site.Params.ordersectionsby | default "weight" }} {{- $currentOrdersectionsby := .Site.Home.Params.ordersectionsby | default $defaultOrdersectionsby }} {{- if $isShortcut }} @@ -53,9 +56,7 @@ {{- $isAncestor := and (not $isSelf) (.IsAncestor $currentNode) }} {{- $isActive = or $isSelf $isActive }} {{- $pages := .Pages }} - {{- if .Page.IsHome }} - {{- $pages = .Sections }} - {{- else if .Page.Sections}} + {{- if .Sections}} {{- $pages = (.Pages | union .Sections) }} {{- end }} {{- $relearnIsHiddenFrom := index ($currentNode.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }} diff --git a/layouts/partials/page-meta.hugo b/layouts/partials/page-meta.hugo index ddf0144b5b..79193c2b64 100644 --- a/layouts/partials/page-meta.hugo +++ b/layouts/partials/page-meta.hugo @@ -52,9 +52,7 @@ {{- end }} {{- $pages := .node.Pages }} - {{- if .node.IsHome }} - {{- $pages = .node.Sections }} - {{- else if .node.Sections }} + {{- if .node.Sections }} {{- $pages = (.node.Pages | union .node.Sections) }} {{- end }} {{- $defaultOrdersectionsby := .defaultOrdersectionsby }} diff --git a/layouts/partials/shortcodes/children.html b/layouts/partials/shortcodes/children.html index 39827010d1..bcd6c7a1a1 100644 --- a/layouts/partials/shortcodes/children.html +++ b/layouts/partials/shortcodes/children.html @@ -18,9 +18,7 @@ {{- with $context }} {{ (printf "<%s class=\"children children-%s children-sort-%s\">" $containerstyle $style $sortTerm)|safeHTML }} {{- $pages := .Page.Pages }} - {{- if .Page.IsHome }} - {{- $pages = .Page.Sections }} - {{- else if .Page.Sections}} + {{- if .Page.Sections}} {{- $pages = (.Page.Pages | union .Page.Sections) }} {{- end }} @@ -89,9 +87,7 @@ {{- end }} {{- $pages := .Page.Pages }} - {{- if .Page.IsHome }} - {{- $pages = .Page.Sections }} - {{- else if .Page.Sections}} + {{- if .Page.Sections}} {{- $pages = (.Page.Pages | union .Page.Sections) }} {{- end }}