mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
theme: remove unnessecary reference to sections #434
- code works if simply .Pages is used - this also fixes ordering issues in the RSS feed
This commit is contained in:
parent
0c10cc8af3
commit
1ee561fd77
5 changed files with 0 additions and 21 deletions
|
@ -1,8 +1,5 @@
|
|||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
||||
{{- $pages := .Page.Pages }}
|
||||
{{- if .Page.Sections}}
|
||||
{{- $pages = (.Page.Pages | union .Page.Sections) }}
|
||||
{{- end }}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 0 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
|
|
|
@ -134,9 +134,6 @@
|
|||
{{- $isAncestor := and (not $isSelf) (.IsAncestor $currentNode) }}
|
||||
{{- $isActive := $isSelf }}
|
||||
{{- $pages := .Pages }}
|
||||
{{- if .Sections}}
|
||||
{{- $pages = (.Pages | union .Sections) }}
|
||||
{{- end }}
|
||||
{{- $relearnIsHiddenFrom := index ($currentNode.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }}
|
||||
{{- $hidden := and $relearnIsHiddenFrom (not $.showhidden) (not $isSelf) (not $isAncestor) }}
|
||||
{{- if $hidden }}
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $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 }}
|
||||
|
@ -56,9 +53,6 @@
|
|||
{{- $isAncestor := and (not $isSelf) (.IsAncestor $currentNode) }}
|
||||
{{- $isActive = or $isSelf $isActive }}
|
||||
{{- $pages := .Pages }}
|
||||
{{- if .Sections}}
|
||||
{{- $pages = (.Pages | union .Sections) }}
|
||||
{{- end }}
|
||||
{{- $relearnIsHiddenFrom := index ($currentNode.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }}
|
||||
{{- $hidden := and $relearnIsHiddenFrom (not $.showhidden) (not $isSelf) (not $isAncestor) }}
|
||||
{{- if $hidden }}
|
||||
|
|
|
@ -52,9 +52,6 @@
|
|||
{{- end }}
|
||||
|
||||
{{- $pages := .node.Pages }}
|
||||
{{- if .node.Sections }}
|
||||
{{- $pages = (.node.Pages | union .node.Sections) }}
|
||||
{{- end }}
|
||||
{{- $defaultOrdersectionsby := .defaultOrdersectionsby }}
|
||||
{{- $currentOrdersectionsby := .node.Params.ordersectionsby | default $defaultOrdersectionsby }}
|
||||
{{- if eq $currentOrdersectionsby "title"}}
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
{{- with $context }}
|
||||
{{ (printf "<%s class=\"children children-%s children-sort-%s\">" $containerstyle $style $sortTerm)|safeHTML }}
|
||||
{{- $pages := .Page.Pages }}
|
||||
{{- if .Page.Sections}}
|
||||
{{- $pages = (.Page.Pages | union .Page.Sections) }}
|
||||
{{- end }}
|
||||
|
||||
{{- $defaultOrdersectionsby := .Site.Params.ordersectionsby | default "weight" }}
|
||||
{{- $currentOrdersectionsby := $sortTerm | default (.Page.Params.ordersectionsby | default $defaultOrdersectionsby) }}
|
||||
|
@ -87,9 +84,6 @@
|
|||
{{- end }}
|
||||
|
||||
{{- $pages := .Page.Pages }}
|
||||
{{- if .Page.Sections}}
|
||||
{{- $pages = (.Page.Pages | union .Page.Sections) }}
|
||||
{{- end }}
|
||||
|
||||
{{- $defaultOrdersectionsby := .Site.Params.ordersectionsby | default "weight" }}
|
||||
{{- $currentOrdersectionsby := $.sortTerm | default (.Page.Params.ordersectionsby | default $defaultOrdersectionsby) }}
|
||||
|
|
Loading…
Reference in a new issue