I have a website where I need to import some asciidocs and render them in hugo and I’m running into issues where I’m not sure if hugo or asciidoctor might be the culprit.
My TOC is rendering without the full path link of the page ie: #anchor-tag
instead of url#anchor-tag
my render-heading.html
partial has a fix for this but asciidocs for some reason do not use the template whereas markdown pages use it perfectly.
These are the options I have in my config.toml for toc and asciidocs
[markup.tableOfContents]
endLevel = 4
ordered = false
startLevel = 2
[markup.asciidocExt]
backend = 'html5'
extensions = []
workingFolderCurrent = false
failureLevel = 'fatal'
noHeaderOrFooter = true
preserveTOC = false
safeMode = 'unsafe'
sectionNumbers = false
trace = false
verbose = false
And this is what my render-heading.html
partial looks like:
<h{{ .Level }} id="{{ .Anchor | safeURL }}"><a href="{{.Page.URL}}#{{ .Anchor | safeURL }}" class="has-text-black">{{ .Text | safeHTML }}</a></h{{ .Level }}>
So I’m trying to figure out what might be the problem and how to fix it any ideas are greatly appreciated thanks.