Files
Bose-SoundTouch/docs/layouts/_default/_markup/render-link.html
T
Tobias GesellchenandClaude Sonnet 4.6 b2bd96a4d0 chore: add Hugo go.sum and update gitignore for Hugo artifacts
Add docs/go.sum (Hextra v0.12.3 checksums) produced by hugo mod tidy.
Update docs/go.mod with the resolved module version.
Ignore docs/.hugo_build.lock, docs/public/, and docs/resources/ —
all are generated by Hugo locally and not needed in the repo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 13:30:36 +02:00

19 lines
833 B
HTML

{{- /*
Render hook: strip .md extension from internal links so that links
written as [foo](OTHER-PAGE.md) in Markdown source resolve to the
Hugo page URL instead of a raw .md path (which returns 404).
This replaces the jekyll-relative-links behaviour from the old Jekyll
site without requiring changes to any content files.
*/ -}}
{{- $dest := .Destination -}}
{{- $isAbs := or (strings.HasPrefix $dest "http://") (strings.HasPrefix $dest "https://") (strings.HasPrefix $dest "//") -}}
{{- if and (not $isAbs) (strings.HasSuffix $dest ".md") -}}
{{- $dest = strings.TrimSuffix ".md" $dest -}}
{{- end -}}
<a href="{{ $dest }}"
{{- with .Title }} title="{{ . }}"{{ end -}}
{{- if $isAbs }} target="_blank" rel="noopener noreferrer"{{ end -}}
>{{ .Text | safeHTML }}</a>
{{- /* Whitespace trimmed intentionally */ -}}