Currently, the mdbook rule requires users to provide a book attribute pointing to a book.toml file.
For example:
mdbook(
name = "doc_book",
srcs = [
"//doc",
],
book = "//:book.toml",
)
However, there are cases where users do not need any custom mdBook configuration. In these scenarios, users have to create an empty book.toml file only to satisfy the rule requirement.
For simple documentation projects, this adds an unnecessary file and extra setup. Users should be able to use the default mdBook behavior without creating a configuration file that contains no custom settings.
Describe the solution you'd like
Make the book attribute optional.
If the book attribute is not provided, the rule could generate a default configuration internally or use mdBook's default behavior.
For example:
mdbook(
name = "doc_book",
srcs = [
"//doc",
],
)
should work without requiring users to create an empty book.toml.
Currently, the
mdbookrule requires users to provide abookattribute pointing to abook.tomlfile.For example:
However, there are cases where users do not need any custom mdBook configuration. In these scenarios, users have to create an empty book.toml file only to satisfy the rule requirement.
For simple documentation projects, this adds an unnecessary file and extra setup. Users should be able to use the default mdBook behavior without creating a configuration file that contains no custom settings.
Describe the solution you'd like
Make the book attribute optional.
If the book attribute is not provided, the rule could generate a default configuration internally or use mdBook's default behavior.
For example:
should work without requiring users to create an empty book.toml.