small fixes

This commit is contained in:
teldra 2022-04-08 21:17:37 +02:00
parent debd457538
commit ebd3e485ce
1 changed files with 10 additions and 8 deletions

View File

@ -1,8 +1,10 @@
{{- $baseurl := .Page.Permalink | safeURL -}} {{ if $.Page.OutputFormats.Get "RSS" }}
{{- $url := printf "%s#%s" $baseurl .Anchor -}} <h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}</h{{ .Level }}>
<h{{ .Level }} id="{{ .Anchor | safeURL }}"> {{ else }}
{{ .Text | safeHTML }} <h{{ .Level }} id="{{ .Anchor | safeURL }}">
<a class="heading-anchor" href="{{ $url }}" style="color: var(--text-muted); font-size: smaller;"> {{ .Text | safeHTML }}
{{ "#" }} <a class="heading-anchor" href="{{ .Anchor }}" style="color: var(--text-muted); font-size: smaller;">
</a> {{ "#" }}
</h{{ .Level }}> </a>
</h{{ .Level }}>
{{ end }}