Skip to content

Is it possible to update the book.toml config in a preprocessor? #1687

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

Open
auser opened this issue Nov 15, 2021 · 2 comments
Open

Is it possible to update the book.toml config in a preprocessor? #1687

auser opened this issue Nov 15, 2021 · 2 comments
Labels
A-Preprocessor Area: Preprocessors

Comments

@auser
Copy link

auser commented Nov 15, 2021

Hey team,

I'm working on a preprocessor where I'd like to update the book.toml in a preprocessor (compiling JS entry files) so that I can add additional properties to an HTML template that's not known ahead of time.

Is it possible to update a the book.toml from the PreprocessorContext?

@ehuss
Copy link
Contributor

ehuss commented Nov 15, 2021

It is not possible. There are other requests to be able to add additional files via a preprocessor (such as #1222), it might be good to add a comment there with your use case if you just need to add additional files.

@auser
Copy link
Author

auser commented Nov 15, 2021

Thanks for the comment, @ehuss

Not sure how to add an additional file to the index.html template without being able to modify the PreprocessorContext object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Preprocessor Area: Preprocessors
Projects
None yet
Development

No branches or pull requests

2 participants