f3783856ad
* feat: add `article.headingAnchor` parameter * feat: use CSS pseudo-element to display `#` symbol of heading anchor This prevents RSS feed readers and screen readers from seeing an extra `#`. * Deactivate `article.headingAnchor` by default
6 lines
203 B
HTML
6 lines
203 B
HTML
<h{{ .Level }} id="{{ .Anchor }}">
|
|
{{- if site.Params.Article.HeadingAnchor -}}
|
|
<a href="#{{ .Anchor }}" class="header-anchor"></a>
|
|
{{- end -}}
|
|
{{ .Text | safeHTML }}
|
|
</h{{ .Level }}> |