[THEME] Add anchor to titles

Add an anchor for each title, display a '#' at left of the titles
and make them clickable links
This commit is contained in:
Gregory Trolliet 2021-10-23 08:07:00 +02:00
parent 4a36ab38b1
commit e4a2d0b68c
2 changed files with 43 additions and 5 deletions

View file

@ -0,0 +1,7 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
<a class="anchor" href="#{{ .Anchor | safeURL }}">
#
<!-- {{ strings.Repeat .Level "#" }} -->
</a>
{{ .Text | safeHTML }}
</h{{ .Level }}>