diff --git a/layouts/partials/include.html b/layouts/partials/include.html index a4202c2..54f5980 100644 --- a/layouts/partials/include.html +++ b/layouts/partials/include.html @@ -8,6 +8,12 @@ {{- $path := .path -}} {{- $context := .context -}} +{{/* Map absolute private paths to the relative content mount point */}} +{{- $path = replace $path "/srv/docs/private/" "private/" -}} + +{{/* Remove leading slash if any (GetPage prefers relative-to-content paths) */}} +{{- $path = trim $path "/" -}} + {{/* Try to get as a Page first (supports mounts and already handles frontmatter) */}} {{- $p := $context.Site.GetPage $path -}} {{- if $p -}}