mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
theme: move page depth processing #825
This commit is contained in:
parent
714b64ab14
commit
36e6ccdf5b
2 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
|||
{{- $to = $page }}
|
||||
{{- $lasturl = partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }}
|
||||
{{- end }}
|
||||
{{- $depth := add 1 (int (partial "get-page-depth.hugo" (dict "page" $page))) }}
|
||||
{{- $depth := add 1 (int (partial "pageHelper/depth.hugo" (dict "page" $page))) }}
|
||||
{{- if .page.Site.Params.disableRootBreadcrumb }}
|
||||
{{- $depth = add $depth -1 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{- $depth := .depth | default 0 }}
|
||||
{{- with $page.Parent }}
|
||||
{{- $depth = add $depth 1 }}
|
||||
{{- partial "get-page-depth.hugo" (dict "page" . "depth" $depth) }}
|
||||
{{- partial "pageHelper/depth.hugo" (dict "page" . "depth" $depth) }}
|
||||
{{- else }}
|
||||
{{- $depth }}
|
||||
{{- end }}
|
Loading…
Reference in a new issue