[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:
parent
4a36ab38b1
commit
e4a2d0b68c
2 changed files with 43 additions and 5 deletions
7
layouts/_default/_markup/render-heading.html
Normal file
7
layouts/_default/_markup/render-heading.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
|
||||
<a class="anchor" href="#{{ .Anchor | safeURL }}">
|
||||
#
|
||||
<!-- {{ strings.Repeat .Level "#" }} -->
|
||||
</a>
|
||||
{{ .Text | safeHTML }}
|
||||
</h{{ .Level }}>
|
Loading…
Add table
Add a link
Reference in a new issue