aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-09-18 18:32:10 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-09-18 18:32:10 +0800
commit6057b9131282e80cfb239167ae3dc9557f2ec66e (patch)
tree0516d4da017ea7637c99eeeb87b7966ff2079c58 /layouts
parent1f6b1568e59fd2c2d908bb1b554eb3eebf3ef8a4 (diff)
downloadrhomepage-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.html5
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>