diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-10-16 00:21:23 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-10-16 00:21:23 +0800 |
| commit | 48ebeca90c6a11b77bc53cbbaae66481a74686d3 (patch) | |
| tree | 58d7bbe3ccf4378dac0e4373277d100073d2b3f5 /layouts/partials/document-view.html | |
| parent | c56f1813a710b29a161b983d86b4774e6f3918cb (diff) | |
| download | rhomepage-48ebeca90c6a11b77bc53cbbaae66481a74686d3.tar.gz rhomepage-48ebeca90c6a11b77bc53cbbaae66481a74686d3.tar.xz | |
Simplify source links and show HTML filenames in breadcrumbs
Diffstat (limited to 'layouts/partials/document-view.html')
| -rw-r--r-- | layouts/partials/document-view.html | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/layouts/partials/document-view.html b/layouts/partials/document-view.html index 5bfc7b6..ffe49eb 100644 --- a/layouts/partials/document-view.html +++ b/layouts/partials/document-view.html @@ -1,19 +1,5 @@ {{- if .File -}} - {{- $rawURL := "" -}} - {{- if .IsPage -}} - {{- $htmlBase := strings.TrimSuffix ".html" .RelPermalink -}} - {{- $rawURL = printf "%s/index.md" $htmlBase -}} - {{- else if .IsSection -}} - {{- $rawURL = printf "%s_index.md" .RelPermalink -}} - {{- end -}} {{- $gitBase := strings.TrimSuffix "/" site.Params.gitBase -}} {{- $gitURL := printf "%s/content/%s" $gitBase .File.Path -}} - <nav class="document-view" aria-label="Document formats"> - <span>view:</span> - <a href="{{ .RelPermalink }}" aria-current="page">html</a> - <span aria-hidden="true">·</span> - <a href="{{ $rawURL }}">raw .md</a> - <span aria-hidden="true">·</span> - <a href="{{ $gitURL }}">git</a> - </nav> + <p class="document-view"><a href="{{ $gitURL }}">source</a></p> {{- end -}} |
