aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/site-identity.html
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-10-16 00:21:23 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-10-16 00:21:23 +0800
commit48ebeca90c6a11b77bc53cbbaae66481a74686d3 (patch)
tree58d7bbe3ccf4378dac0e4373277d100073d2b3f5 /layouts/partials/site-identity.html
parentc56f1813a710b29a161b983d86b4774e6f3918cb (diff)
downloadrhomepage-48ebeca90c6a11b77bc53cbbaae66481a74686d3.tar.gz
rhomepage-48ebeca90c6a11b77bc53cbbaae66481a74686d3.tar.xz
Simplify source links and show HTML filenames in breadcrumbs
Diffstat (limited to 'layouts/partials/site-identity.html')
-rw-r--r--layouts/partials/site-identity.html3
1 files changed, 1 insertions, 2 deletions
diff --git a/layouts/partials/site-identity.html b/layouts/partials/site-identity.html
index 0f18d35..631969a 100644
--- a/layouts/partials/site-identity.html
+++ b/layouts/partials/site-identity.html
@@ -4,14 +4,13 @@
<a class="site-root" href="{{ "/" | relURL }}">{{ $identity }}</a><span class="site-separator" aria-hidden="true">/</span>
{{- if not $page.IsHome -}}
{{- $path := strings.TrimSuffix "/" $page.RelPermalink -}}
- {{- $path = strings.TrimSuffix ".html" $path -}}
{{- $prefix := "/" -}}
{{- $segments := split $path "/" -}}
{{- range $index, $segment := $segments -}}
{{- if ne $segment "" -}}
{{- $prefix = printf "%s%s/" $prefix $segment -}}
{{- if eq (add $index 1) (len $segments) -}}
- <a class="site-current" href="{{ $page.RelPermalink }}" aria-current="page">{{ $segment }}</a><span class="site-separator" aria-hidden="true">/</span>
+ <a class="site-current" href="{{ $page.RelPermalink }}" aria-current="page">{{ $segment }}</a>{{ if strings.HasSuffix $page.RelPermalink "/" }}<span class="site-separator" aria-hidden="true">/</span>{{ end }}
{{- else -}}
<a class="site-crumb" href="{{ $prefix | relURL }}">{{ $segment }}</a><span class="site-separator" aria-hidden="true">/</span>
{{- end -}}