diff --git a/layouts/shortcodes/ilink.html b/layouts/shortcodes/ilink.html index bf31ad1..a449905 100644 --- a/layouts/shortcodes/ilink.html +++ b/layouts/shortcodes/ilink.html @@ -7,6 +7,7 @@ {{- $fragsep := cond (eq $frag "") "" "#" -}} {{- $btext := or (.Get "btext") (printf "%d" $linkid) -}} {{- $btitle := .Get "btitle" -}} +{{- $prefix := .Get "prefix" -}} {{- $anchor := printf "link-%d" $linkid -}} {{- $inner := .Inner -}} {{- $linkTitle := (.Get "title") -}} @@ -14,6 +15,6 @@ {{- $url := printf "%s%s%s" .Permalink $fragsep $frag -}} {{- $text := or $inner .Title -}} {{ $text | markdownify }} + href="{{ $url }}">{{ with $prefix }}{{ markdownify . }} {{ end }}{{ $text | markdownify }} {{- .Scratch.Add "backlinks" (slice (dict "anchor" $anchor "page" $this "btext" $btext "btitle" $btitle)) -}} {{- end -}}