You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the handling of the arguments passed to Asciidoctor CLI is very inconsistent.
A few examples:
With no asciidocext options in the config.toml, the args passed to Asciidoctor are:
--no-header-footer --trace -
config.toml:
[markup.asciidocext]
trace = true
Asciidoctor args:
--no-header-footer --trace --trace -
config.toml:
[markup.asciidocext]
trace = false
Asciidoctor args:
--no-header-footer --trace -
config.toml:
[markup.asciidocext]
verbose = false
Asciidoctor args:
--no-header-footer -v --trace -
config.toml:
[markup.asciidocext]
verbose = true
Asciidoctor args:
--no-header-footer --trace -
It seems the implementation had two goals in mind:
Allow Hugo to have different defaults from Asciidoctor CLI
Minimize the arguments passed to Asciidoctor by skipping options that are already the default in Asciidoctor CLI
The problem is that to achieve this, we need two sets of default values: Hugo's and Asciidoctor's. However, the current implementation only has one set of defaults which for some options it seems to mean Hugo's defaults and for others it means Asciidoctor's defaults.
I think there are three options to solve the issue:
The cleanest one would be to just have two default configs: Hugo's and Asciidoctor's, so that both goals above can be easily met
Only have Hugo's defaults and don't minimize arguments - avoids the need for a second var with config defaults, but it may be too noisy in the logs while debugging
Specify explicitly which options are meant to be Hugo's defaults and which ones are Asciidoctor's defaults. In this case, default values for options of type string have to either match Asciidoctor's defaults, or not be minimized and always be set explicitly; default values for options of type boolean can mean Hugo's defaults and still be minimized, because in Asciidoctor CLI, boolean flags are always false by default.
The option 3 seems to have been the aim of the current implementation, because the defaults are not exactly the same as Asciidoctor's defaults, but then it assumes that's the case when trying to minimize them.
The text was updated successfully, but these errors were encountered:
At the moment, the handling of the arguments passed to Asciidoctor CLI is very inconsistent.
A few examples:
With no
asciidocext
options in theconfig.toml
, the args passed to Asciidoctor are:config.toml
:Asciidoctor args:
config.toml
:Asciidoctor args:
config.toml
:Asciidoctor args:
config.toml
:Asciidoctor args:
It seems the implementation had two goals in mind:
The problem is that to achieve this, we need two sets of default values: Hugo's and Asciidoctor's. However, the current implementation only has one set of defaults which for some options it seems to mean Hugo's defaults and for others it means Asciidoctor's defaults.
I think there are three options to solve the issue:
The option 3 seems to have been the aim of the current implementation, because the defaults are not exactly the same as Asciidoctor's defaults, but then it assumes that's the case when trying to minimize them.
The text was updated successfully, but these errors were encountered: