Add new internal ref shortcodes
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
7
layouts/shortcodes/internalref.html
Normal file
7
layouts/shortcodes/internalref.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{- $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 */ -}}
|
||||
Reference in New Issue
Block a user