Use anchor heading attribute instead of bookHeadingAnchor
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
---
|
||||
title: Introduction
|
||||
bookHeadingAnchor: false
|
||||
layout: landing
|
||||
---
|
||||
|
||||
<div class="book-hero">
|
||||
|
||||
# HUGO BOOK
|
||||
# HUGO BOOK {anchor=false}
|
||||
[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" >}}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h{{ .Level }} id="{{ .Anchor }}" {{- with .Attributes.class }} class="{{ . }}" {{- end }}>
|
||||
{{ .Text }}
|
||||
{{ if default true .Page.Params.bookHeadingAnchor }}
|
||||
<h{{ .Level }} id="{{ .Anchor }}" {{- with .Attributes.class -}}class="{{ . }}"{{- end -}}>
|
||||
{{- .Text -}}
|
||||
{{- if default true .Attributes.anchor }}
|
||||
<a class="anchor" href="#{{ .Anchor }}">#</a>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</h{{ .Level }}>
|
||||
|
||||
Reference in New Issue
Block a user