File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1313{{ $filepath := .Get "filepath" }}
1414{{ $currentPath := .Page.RelPermalink }}
1515
16+ {{ $fullFilepath = printf "%s%s" .Site.BaseURL $filepath }}
17+ {{ $fullCurrentPath = printf "%s%s" .Site.BaseURL $filepath }}
18+
1619{{/* Remove trailing slash from both paths for consistent comparison */}}
17- {{ $normalizedFilepath := cond (strings.HasSuffix $filepath "/") (substr $filepath 0 (sub (len $filepath) 1)) $filepath }}
18- {{ $normalizedCurrentPath := cond (strings.HasSuffix $currentPath "/") (substr $currentPath 0 (sub (len $currentPath) 1)) $currentPath }}
20+ {{ $normalizedFilepath := cond (strings.HasSuffix $fullFilepath "/") (substr $filepath 0 (sub (len $filepath) 1)) $filepath }}
21+ {{ $normalizedCurrentPath := cond (strings.HasSuffix $fullCurrentPath "/") (substr $currentPath 0 (sub (len $currentPath) 1)) $currentPath }}
1922
2023{{/* Debug output */}}
2124< div style ="border: 1px solid red; padding: 10px; margin: 10px 0; background: #ffe6e6; ">
You can’t perform that action at this time.
0 commit comments