From 70704b634dbb8b1ec71423ef88502ba667d91fb1 Mon Sep 17 00:00:00 2001 From: Ngô Ngọc Đức Huy Date: Fri, 4 Aug 2023 20:58:50 +0700 Subject: Add link to headings --- assets/css/theme.css | 6 +++++- layouts/_default/_markup/render-heading.html | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 layouts/_default/_markup/render-heading.html diff --git a/assets/css/theme.css b/assets/css/theme.css index 22400e9..1c10e99 100644 --- a/assets/css/theme.css +++ b/assets/css/theme.css @@ -55,6 +55,10 @@ a.nav-next::before { content: "← " } -.toc-collapse { +h2, .toc-collapse { text-align: initial; } + +h2::before, h3::before, h4::before, h5::before, h6::before { + content: "§ "; +} 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 }} + + + {{ .Text | safeHTML }} + + -- cgit 1.4.1