From 0f05d229021cd49662fa9a09907a5a9fe82b7a84 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Thu, 26 Oct 2023 08:57:05 +0200 Subject: [PATCH] 'embed' shortcode: provide backlink with anchor (fragment) --- layouts/shortcodes/embed.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/embed.html b/layouts/shortcodes/embed.html index 3d0e9ba..a743834 100644 --- a/layouts/shortcodes/embed.html +++ b/layouts/shortcodes/embed.html @@ -7,7 +7,8 @@ {{- $btitle := .Get "btitle" -}} {{- range $pages -}} - {{- .Scratch.Add "backlinks" (slice (dict "page" $this "btext" $btext "btitle" $btitle)) -}} + {{- $anchor := anchorize .Title -}} + {{- .Scratch.Add "backlinks" (slice (dict "anchor" $anchor "page" $this "btext" $btext "btitle" $btitle)) -}} ### [{{ .Title }}]({{ .Permalink }}) {{ .RenderShortcodes }}