summaryrefslogtreecommitdiffstats
path: root/site/layouts/_default/_markup/render-heading.html
diff options
context:
space:
mode:
Diffstat (limited to 'site/layouts/_default/_markup/render-heading.html')
-rw-r--r--site/layouts/_default/_markup/render-heading.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/site/layouts/_default/_markup/render-heading.html b/site/layouts/_default/_markup/render-heading.html
new file mode 100644
index 0000000..cfb3d8f
--- /dev/null
+++ b/site/layouts/_default/_markup/render-heading.html
@@ -0,0 +1,5 @@
+<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
+{{- if and (ge .Level .Page.Site.Params.anchors.min) (le .Level .Page.Site.Params.anchors.max) }}{{" " -}}
+<a class="anchor-link" href="#{{ .Anchor | safeURL }}" aria-label="Link to this section: {{ .Text | safeHTML }}"></a>
+{{- end -}}
+</h{{ .Level }}>