Skip to content

Commit

Permalink
2023-11-04 00:46:46
Browse files Browse the repository at this point in the history
  • Loading branch information
uidHUB committed Nov 4, 2023
1 parent 9619766 commit 5aa1b73
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions layouts/_default/_markup/render-heading.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
{{- $anchor := ((.Anchor) | safeURL) -}}
{{- $text := ((.Text) | safeHTML) -}}

<h{{ ($level) }} id="{{ ($anchor) }}">
<a class="link-body-emphasis" href="#{{ ($anchor) }}">{{ ($text) }}</a>
</h{{ ($level) }}>
{{- if (in (site.Params.toc.sections) (.Page.Section)) -}}
<h{{ ($level) }} id="{{ ($anchor) }}">
<a class="link-body-emphasis" href="#{{ ($anchor) }}">{{ ($text) }}</a>
</h{{ ($level) }}>
{{- else -}}
<h{{ ($level) }}>{{ ($text) }}</h{{ ($level) }}>
{{- end -}}
{{- /* This comment removes trailing newlines. */ -}}

0 comments on commit 5aa1b73

Please sign in to comment.