Skip to content

Commit d2ea54b

Browse files
committed
Debug info for show-on-path
1 parent f827241 commit d2ea54b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

layouts/shortcodes/show-on-path.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717
{{ $normalizedFilepath := cond (strings.HasSuffix $filepath "/") (substr $filepath 0 (sub (len $filepath) 1)) $filepath }}
1818
{{ $normalizedCurrentPath := cond (strings.HasSuffix $currentPath "/") (substr $currentPath 0 (sub (len $currentPath) 1)) $currentPath }}
1919

20+
{{/* Debug output */}}
21+
<div style="border: 1px solid red; padding: 10px; margin: 10px 0; background: #ffe6e6;">
22+
<strong>Debug Info:</strong><br>
23+
currentPath: {{ $currentPath }}<br>
24+
filepath: {{ $filepath }}<br>
25+
normalizedCurrentPath: {{ $normalizedCurrentPath }}<br>
26+
normalizedFilepath: {{ $normalizedFilepath }}<br>
27+
Match: {{ eq $normalizedCurrentPath $normalizedFilepath }}
28+
</div>
29+
2030
{{/* Display content only if paths match */}}
2131
{{ if eq $normalizedCurrentPath $normalizedFilepath }}
2232
{{ .Inner | markdownify }}

0 commit comments

Comments
 (0)