vanilla-hugo/layouts/shortcodes/internalref.html
Danila Fedorin 431d4b0990 Add new internal ref shortcodes
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-12-25 19:03:05 -08:00

8 lines
243 B
HTML

{{- $name := .Get 0 -}}
{{- $number := index (.Page.Scratch.Get "internal-ref") $name -}}
<a href="#internal-ref-{{ $name }}">
{{ .Inner }}
<span class="internal-ref-counter">{{ $number }}</span></a>
{{- /* chomp whitespace at the end */ -}}