Skip to content
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

Do not ignore HtmlConfig syntax errors silently #1032

Closed
TjeuKayim opened this issue Sep 22, 2019 · 0 comments · Fixed by #1033
Closed

Do not ignore HtmlConfig syntax errors silently #1032

TjeuKayim opened this issue Sep 22, 2019 · 0 comments · Fixed by #1033

Comments

@TjeuKayim
Copy link
Contributor

TjeuKayim commented Sep 22, 2019

HtmlConfig parsing error are silently ignored and the default values are used. This makes it hard for users to troubleshoot typos in their book.toml.

I tried this book.toml:

[output.html]
default-theme = "navy"
curly-quotes = "true"
# should have been: curly-quotes = true

I expected to see this happen: mdBook displays a warning or error message when building if the configuration contains a syntax error, like
[WARNING] (mdbook::book): Configuration value for 'output.html.curly-quotes' is invalid, expected a boolean but got string "true".
It applies the valid config nodes and sets the default-theme to navy, but uses the default value for curly-quotes.

Instead, this happened: The build succeeds without any warning, and ignores the valid config nodes under output.html. So the default-theme falls back to default.

Meta

mdBook version b4bb442

@TjeuKayim TjeuKayim changed the title Silent Do not ignore HtmlConfig syntax errors silently Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant