So asciidoctor has attributes you can set on the command line to set globally
i.e.
:icons: font
:iconsdir: /images/icons
which can be set by in CLI usage like:
asciidoctor -a icons=font -a iconsdir=/images/icons
So instead of putting in the two attributes in every file, it can just be globally set.
I don't see any way to pass along extra arguments
It would be nice if there was some sort of config level option in hugo to pass extra parameters to external helpers.
There has been a recent discussion about this.
See the discussion here: https://github.com/gohugoio/hugo/pull/4060
Not being able to pass global AsciiDoc attributes to Asciidoctor severely limits its usefulness. There are certain attributes you don't even want to set per document because they are a publishing detail.
Rather than adding additional configuration for AsciiDoc / Asciidoctor, you may just consider allowing the arguments to the asciidoctor command to be controlled. This would not only allow global attributes to be set (the -a flag), but also make it possible to load extensions (-r flag).
Most helpful comment
Not being able to pass global AsciiDoc attributes to Asciidoctor severely limits its usefulness. There are certain attributes you don't even want to set per document because they are a publishing detail.
Rather than adding additional configuration for AsciiDoc / Asciidoctor, you may just consider allowing the arguments to the asciidoctor command to be controlled. This would not only allow global attributes to be set (the
-aflag), but also make it possible to load extensions (-rflag).