diff --git a/exampleSite/content.en/_index.md b/exampleSite/content.en/_index.md index c9ff7ba..6b3f454 100644 --- a/exampleSite/content.en/_index.md +++ b/exampleSite/content.en/_index.md @@ -1,12 +1,11 @@ --- title: Introduction -bookHeadingAnchor: false layout: landing ---
-# 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" >}} diff --git a/layouts/_markup/render-heading.html b/layouts/_markup/render-heading.html index d2b3c28..762a0f6 100644 --- a/layouts/_markup/render-heading.html +++ b/layouts/_markup/render-heading.html @@ -1,6 +1,6 @@ - - {{ .Text }} - {{ if default true .Page.Params.bookHeadingAnchor }} + + {{- .Text -}} + {{- if default true .Attributes.anchor }} # - {{ end }} + {{- end -}}