This commit is contained in:
Piotr Płaczek 2025-07-14 11:59:17 +01:00 committed by GitHub
commit ceeb3039ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,10 +10,7 @@
{{- $isFragment := strings.HasPrefix .Destination "#" }} {{- $isFragment := strings.HasPrefix .Destination "#" }}
{{- if and (not $isRemote) (not $isFragment) }} {{- if and (not $isRemote) (not $isFragment) }}
{{- $url := urls.Parse .Destination }} {{- $url := urls.Parse .Destination }}
{{- $path := strings.TrimSuffix "/_index.md" $url.Path }} {{- $page := .Page.GetPage $url.Path }}
{{- $path = strings.TrimSuffix "/_index" $path }}
{{- $path = strings.TrimSuffix ".md" $path }}
{{- $page := .Page.GetPage $path }}
{{- if $page }} {{- if $page }}
{{- $destination = $page.RelPermalink }} {{- $destination = $page.RelPermalink }}
{{- if $url.Fragment }} {{- if $url.Fragment }}