Use anchor heading attribute instead of bookHeadingAnchor
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
---
|
---
|
||||||
title: Introduction
|
title: Introduction
|
||||||
bookHeadingAnchor: false
|
|
||||||
layout: landing
|
layout: landing
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="book-hero">
|
<div class="book-hero">
|
||||||
|
|
||||||
# HUGO BOOK
|
# HUGO BOOK {anchor=false}
|
||||||
[Hugo](https://gohugo.io) documentation theme as simple as plain book
|
[Hugo](https://gohugo.io) documentation theme as simple as plain book
|
||||||
|
|
||||||
{{< badge style="info" title="Badge" value="Value" >}} {{< badge style="default" title="Badge" value="Value" >}}
|
{{< badge style="info" title="Badge" value="Value" >}} {{< badge style="default" title="Badge" value="Value" >}}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<h{{ .Level }} id="{{ .Anchor }}" {{- with .Attributes.class }} class="{{ . }}" {{- end }}>
|
<h{{ .Level }} id="{{ .Anchor }}" {{- with .Attributes.class -}}class="{{ . }}"{{- end -}}>
|
||||||
{{ .Text }}
|
{{- .Text -}}
|
||||||
{{ if default true .Page.Params.bookHeadingAnchor }}
|
{{- if default true .Attributes.anchor }}
|
||||||
<a class="anchor" href="#{{ .Anchor }}">#</a>
|
<a class="anchor" href="#{{ .Anchor }}">#</a>
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
</h{{ .Level }}>
|
</h{{ .Level }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user