-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for configuration options #200
Comments
@max-heller, what do you think of taking advantage of I'm basically suggesting that "heavy" output formats like People would then have to override it back to
This would mean that We could even make this more clear by letting the output formats do this if another config value is set: [output.foo]
optional = true
run-when-optional = false It would all be convention, but it feels like it could be a useful convention for rarely used output formats like the ones discussed here? |
While these semantics (and an associated way to run a specific renderer) would make sense to me if
This makes more sense to me because it is opt-in and preserves the Some other thoughts:
|
Yeah, using two options together should work nicely. What I like is that I can hard code everything in the |
Bikeshed: how about |
I'm happy with |
Thinking about this some more, it feels odd to have |
@mgeisler any opinions on this? |
Sorry for the delay! Yeah, you're right: having a simple
I'll be happy to implement this for |
… available (#93) Adds a `disabled` flag to disable rendering even if `mdbook-pandoc` is available. Since rendering may rely on external dependencies, this can be used to e.g. disable rendering except in CI where needed dependencies are known to be installed. Related to google/mdbook-i18n-helpers#200 (comment)
) Implements the approach summarized in google/mdbook-i18n-helpers#200 (comment) to disable running `mdbook-pandoc` even if it is available to avoid dependency-related issues during local rendering. Should address #1911 since `mdbook-pandoc` will no longer run locally.
For Comprehensive Rust, we use a
granularity: 0
setting when extracting messages withmdbook-xgettext
. This avoids churn in the line numbers.However, it happens regularly (google/comprehensive-rust#2100, google/comprehensive-rust#1991, google/comprehensive-rust#1950, ...) that people forget to use this setting.
I would love to have a way of specifying the right settings in a configuration file. Something which can turn
into just
or similar.
We could already store the options in our
book.toml
file today. The reason we don't do this is that this would enable thexgettext
output unconditionally for everybody.Some ideas for solving this:
mdbook-xgettext
required and enabled in every execution. This would be a little wasteful, but it might not matter if it's quick enough? Measure this to get some data.mdbook-xgettext
optional withoptional: true
inbook.toml
. Make it exit early when it sees that it's optional. If this works well, we could use it for themdbook-pandoc
output too. See Pandoc failure during local rendering comprehensive-rust#1911 for a recent example of it failing.mdbook-xgettext
directly using the above config hack.The text was updated successfully, but these errors were encountered: