mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-17 22:32:10 +00:00
Only render anchor links in post pages
This commit is contained in:
parent
4d5c725147
commit
ec5d613ffc
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@
|
||||||
Yeah I know, the situation isn't optimal.
|
Yeah I know, the situation isn't optimal.
|
||||||
-->
|
-->
|
||||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
|
||||||
{{ if gt .Level 1 -}}
|
{{ if and (gt .Level 1) (eq .Page.Section "posts") -}}
|
||||||
<a href="#{{ .Anchor | safeURL }}" aria-hidden="true" tabindex="-1">
|
<a href="#{{ .Anchor | safeURL }}" aria-hidden="true" tabindex="-1">
|
||||||
{{- $octothorpes := sub .Level 1 -}}
|
{{- $octothorpes := sub .Level 1 -}}
|
||||||
{{- range $i, $sequence := (seq $octothorpes) -}}
|
{{- range $i, $sequence := (seq $octothorpes) -}}
|
||||||
|
|
Loading…
Reference in a new issue