From 42c48978bb91df293befcc953efdc86e1c06247b Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Tue, 4 Jan 2022 09:20:16 +0100 Subject: [PATCH] provide ilink shortcode for linking to internal pages via pageid --- layouts/shortcodes/ilink.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 layouts/shortcodes/ilink.html diff --git a/layouts/shortcodes/ilink.html b/layouts/shortcodes/ilink.html new file mode 100644 index 0000000..4c64fde --- /dev/null +++ b/layouts/shortcodes/ilink.html @@ -0,0 +1,5 @@ +{{- $pages := where .Site.RegularPages "Params.pageid" "eq" (.Get "pid") -}} +{{- $inner := .Inner -}} +{{- range $pages -}} +{{ or $inner .Title | markdownify }} +{{- end -}}