From 36e6ccdf5b97f644cb5f46e45afc776b010ec02f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 7 Apr 2024 15:16:34 +0200 Subject: [PATCH] theme: move page depth processing #825 --- layouts/partials/breadcrumbs.html | 2 +- layouts/partials/{get-page-depth.hugo => pageHelper/depth.hugo} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename layouts/partials/{get-page-depth.hugo => pageHelper/depth.hugo} (76%) diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html index a0dea230cb..4e097f6253 100644 --- a/layouts/partials/breadcrumbs.html +++ b/layouts/partials/breadcrumbs.html @@ -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 }} diff --git a/layouts/partials/get-page-depth.hugo b/layouts/partials/pageHelper/depth.hugo similarity index 76% rename from layouts/partials/get-page-depth.hugo rename to layouts/partials/pageHelper/depth.hugo index dd0d646eab..228393aeab 100644 --- a/layouts/partials/get-page-depth.hugo +++ b/layouts/partials/pageHelper/depth.hugo @@ -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 }} \ No newline at end of file