diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-09-18 18:32:10 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-09-18 18:32:10 +0800 |
| commit | 6057b9131282e80cfb239167ae3dc9557f2ec66e (patch) | |
| tree | 0516d4da017ea7637c99eeeb87b7966ff2079c58 /layouts | |
| parent | 1f6b1568e59fd2c2d908bb1b554eb3eebf3ef8a4 (diff) | |
| download | rhomepage-6057b9131282e80cfb239167ae3dc9557f2ec66e.tar.gz rhomepage-6057b9131282e80cfb239167ae3dc9557f2ec66e.tar.xz | |
Resolve links to page bundle resources
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/_default/_markup/render-link.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html new file mode 100644 index 0000000..e6667f9 --- /dev/null +++ b/layouts/_default/_markup/render-link.html @@ -0,0 +1,5 @@ +{{- $destination := .Destination -}} +{{- with .Page.Resources.GetMatch .Destination -}} + {{- $destination = .RelPermalink -}} +{{- end -}} +<a href="{{ $destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a> |
