-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Question
Recently, I tried to build Zed docs without using its custom preprocessor, [preprocessor.zed_docs_preprocessor]
.
Originally, I thought I could use MDBOOK_XXX
env to disable it by assigning it with an empty object, {}
, like this:
MDBOOK_PREPROCCESSOR__ZED_DOCS_PREPROCESSOR={} mdbook build docs
However, it failed because mdbook will recognize:
MDBOOK_PREPROCCESSOR__ZED_DOCS_PREPROCESSOR
-> [preprocessor.zed-docs-preprocessor]
Based on the Environment Variables section:
Variables starting with
MDBOOK_
are used for configuration. The key is created by removing theMDBOOK_
prefix and turning the resulting string intokebab-case
. Double underscores (__
) separate nested keys, while a single underscore (_
) is replaced with a dash (-
).For example:
MDBOOK_foo
->foo
MDBOOK_FOO
->foo
MDBOOK_FOO__BAR
->foo.bar
MDBOOK_FOO_BAR
->foo-bar
MDBOOK_FOO_bar__baz
->foo-bar.baz
It seems that mdbook's MDBOOK_XXX
env can deal with configuration strings with a dash (-
) and a dot (.
), but it cannot deal with an underscore (_
).
My questions are:
- If so, does it mean that it's not recommended to use
_
in configuration strings? - If not, then how does
MDBOOK_XXX
env deal with configuration strings with_
?
Version
mdbook v0.4.40