mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-07-16 11:41:27 +00:00
Remove unneeded portable link trim
This commit is contained in:
parent
f2c703e155
commit
d7e76d58fc
@ -10,10 +10,7 @@
|
||||
{{- $isFragment := strings.HasPrefix .Destination "#" }}
|
||||
{{- if and (not $isRemote) (not $isFragment) }}
|
||||
{{- $url := urls.Parse .Destination }}
|
||||
{{- $path := strings.TrimSuffix "/_index.md" $url.Path }}
|
||||
{{- $path = strings.TrimSuffix "/_index" $path }}
|
||||
{{- $path = strings.TrimSuffix ".md" $path }}
|
||||
{{- $page := .Page.GetPage $path }}
|
||||
{{- $page := .Page.GetPage $url.Path }}
|
||||
{{- if $page }}
|
||||
{{- $destination = $page.RelPermalink }}
|
||||
{{- if $url.Fragment }}
|
||||
|
Loading…
Reference in New Issue
Block a user