Simplify heading rendering
This commit is contained in:
1
layouts/_default/_markup/render-heading.html
Normal file
1
layouts/_default/_markup/render-heading.html
Normal file
@ -0,0 +1 @@
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}" class="anchor" aria-hidden="true">#</a></h{{ .Level }}>
|
@ -31,7 +31,7 @@
|
||||
{{ partial "sidebar/docs-toc.html" . }}
|
||||
</nav>
|
||||
{{ end -}}
|
||||
{{ partial "main/headline-hash.html" .Content }}
|
||||
{{ .Content }}
|
||||
{{ if .Site.Params.editPage -}}
|
||||
{{ partial "main/edit-page.html" . }}
|
||||
{{ end -}}
|
||||
@ -45,4 +45,4 @@
|
||||
-->
|
||||
</main>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -1 +0,0 @@
|
||||
{{ . | replaceRE "(<h[2-9] id=\"([^\"]+)\".+)(</h[2-9]+>)" `${1}<a href="#${2}" class="anchor" aria-hidden="true">#</a> ${3}` | safeHTML }}
|
Reference in New Issue
Block a user