mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-05-31 23:08:24 -04:00
anchored-headings: port to PaperMod
- add corresponding css - gen anchored headings for h1-h6 - link with single.html
This commit is contained in:
parent
2b0619f684
commit
cf4fd27e3d
3 changed files with 16 additions and 2 deletions
|
@ -1,2 +1,2 @@
|
|||
<!-- formats .Content headings by adding an anchor -->
|
||||
{{ . | replaceRE "(<h[2-3] id=\"([^\"]+)\".+)(</h[2-9]+>)" "${1}<a class=\"anchor\" href=\"#${2}\">#</a>${3}" | safeHTML }}
|
||||
{{ . | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" "${1}<a hidden class=\"anchor\" aria-hidden=\"true\" href=\"#${2}\">#</a>${3}" | safeHTML }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue