mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-05-01 02:35:50 +08:00
theme: move page depth processing #825
This commit is contained in:
parent
714b64ab14
commit
36e6ccdf5b
@ -7,7 +7,7 @@
|
|||||||
{{- $to = $page }}
|
{{- $to = $page }}
|
||||||
{{- $lasturl = partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }}
|
{{- $lasturl = partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }}
|
||||||
{{- end }}
|
{{- 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 }}
|
{{- if .page.Site.Params.disableRootBreadcrumb }}
|
||||||
{{- $depth = add $depth -1 }}
|
{{- $depth = add $depth -1 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{{- $depth := .depth | default 0 }}
|
{{- $depth := .depth | default 0 }}
|
||||||
{{- with $page.Parent }}
|
{{- with $page.Parent }}
|
||||||
{{- $depth = add $depth 1 }}
|
{{- $depth = add $depth 1 }}
|
||||||
{{- partial "get-page-depth.hugo" (dict "page" . "depth" $depth) }}
|
{{- partial "pageHelper/depth.hugo" (dict "page" . "depth" $depth) }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $depth }}
|
{{- $depth }}
|
||||||
{{- end }}
|
{{- end }}
|
Loading…
x
Reference in New Issue
Block a user