diff options
author | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2023-08-04 20:58:50 +0700 |
---|---|---|
committer | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2023-08-04 20:58:59 +0700 |
commit | 70704b634dbb8b1ec71423ef88502ba667d91fb1 (patch) | |
tree | 63601ed91ca4f6990e537a77bdfd285f19f2fdeb /layouts/_default/_markup/render-heading.html | |
parent | f3331d5172bd711d5cd6a4978b85d1cef9d7e355 (diff) | |
download | victor-70704b634dbb8b1ec71423ef88502ba667d91fb1.tar.gz |
Add link to headings
Diffstat (limited to 'layouts/_default/_markup/render-heading.html')
-rw-r--r-- | layouts/_default/_markup/render-heading.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..bf2eb5b --- /dev/null +++ b/layouts/_default/_markup/render-heading.html @@ -0,0 +1,6 @@ +{{ $id := .Anchor | safeURL }} +<h{{ .Level }} id="{{ $id }}"> +<a class="heading-anchor" href="#{{ $id }}"> + {{ .Text | safeHTML }} +</a> +</h{{ .Level }}> |