hextra icon indicating copy to clipboard operation
hextra copied to clipboard

asciidoctor not working

Open steveschow opened this issue 1 year ago • 5 comments

Trying to use asciidoctor to render my posts in Hugo+hextra. I am new to Hugo and like the hextra theme, hope to use it. But it's not working at all, wondering if there is incompatibility with asciidoctor and hextra?

when I create a very simple adoc page, I get the following error in browser:

Screenshot 2025-01-13 at 6 27 02 PM

steveschow avatar Jan 14 '25 01:01 steveschow

Yeah, it was mainly implemented for Markdown, so didn't get chance to fully test in for other file formats.

A stopgap here would be disabling ToC for AsciiDoc documents, so at least it doesn't error out like this.

imfing avatar Jan 14 '25 03:01 imfing

I'll try to figure out how to disable Hugo TOC, though I will need that eventually too. So I hope hextra will be able to support asciidoctor. Really love your theme, but I also really need asciidoc, though the shortcodes in hextra cover a lot of ground too.

steveschow avatar Jan 14 '25 03:01 steveschow

The screenshot suggests that the sidebar-toc was the culprit. You can override the sidebar partial template to remove the references.

Or I can put a quick fix as a stopgap as I mentioned earlier.

imfing avatar Jan 14 '25 04:01 imfing

guess I can't figure it out now, will try a different theme. Thanks.

steveschow avatar Jan 14 '25 04:01 steveschow

this looks like a Hugo issue, since {{ with $page.Fragments.Headings }} simply calls the page methods that throws a nil pointer deref error 🤔

imfing avatar Jan 18 '25 19:01 imfing