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

Handle changes in external files. #1682

Closed
wants to merge 2 commits into from
Closed

Conversation

zvavybir
Copy link

@zvavybir zvavybir commented Nov 7, 2021

I noticed that if you include files which are outside of the root directory of the book, than changes don't trigger rebuilds with the watch (and serve) subcommand. I'm not really familiar with this code base, so I'm aware that it's probably sub optimal.

@ehuss
Copy link
Contributor

ehuss commented Nov 20, 2021

Thanks for the PR! Sorry, though, I'm having a hard time understanding what this is doing or what the context is. Is there an issue this is related to, such as #1222 maybe? I think changes to the preprocessor API will require a bit of design work and discussion before heading to a PR. There is also some more recent discussion at #1689.

@zvavybir
Copy link
Author

One of the files (src/english.md) in my current project just includes some outer file:

{{#include ../../README.md}}

Usually mdbook serve automatically reloads if one of the files gets edited, but since the README.md is not in the book's root directory, it doesn't when I edit it. This PR tries to fix this by allowing preprocessors to notify mdbook that serve has to look at some additional files. Hope that clarifies it a bit.
I think this problem is unrelated to #1222 and was not mentioned in #1689, but has to be considered for the last one, since – as far as I understand it – style and script files will be outside of the root directory too.

Concerning the "design work and discussion", I think this PR would be a acceptable solution, but is ultimately just a proposal.

@ehuss
Copy link
Contributor

ehuss commented Jun 1, 2022

I'm going to close as this probably isn't the direction I think it should go for this issue.

@ehuss ehuss closed this Jun 1, 2022
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 this pull request may close these issues.

2 participants