about summary refs log tree commit diff
path: root/layouts
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2023-08-04 20:58:50 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2023-08-04 20:58:59 +0700
commit70704b634dbb8b1ec71423ef88502ba667d91fb1 (patch)
tree63601ed91ca4f6990e537a77bdfd285f19f2fdeb /layouts
parentf3331d5172bd711d5cd6a4978b85d1cef9d7e355 (diff)
downloadvictor-70704b634dbb8b1ec71423ef88502ba667d91fb1.tar.gz
Add link to headings
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/_markup/render-heading.html6
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 }}>