rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
18.36k stars 1.65k forks source link

Is there an option to disable automatic file creation from `SUMMARY.md`? #2413

Closed Social-Mean closed 4 months ago

Social-Mean commented 4 months ago

Question

When mdbook serve or mdbook watch, mdbook will automatically create files that do not exist in dirs. It is convenient but sometimes may cause mistakes. For example, sometimes I type the wrong filename and save the SUMMARY.md, but mdbook helps me create the file, and I have to delete the file manually.

Is there an option to disable automatic file creation from SUMMARY.md? Like mdbook serve --no-create-file (the name --no-create-file may not be the best). And the mdbook compiler will not create files but raise warnings in the command line.

Version

mdbook v0.4.40
ehuss commented 4 months ago

Set build.create-missing=false, see build options.

Social-Mean commented 4 months ago

@ehuss Perfect!Thanks a lot.