How to stop mdbook from looking for summary.md in inner crate.

Open
#2,147 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
documentation

Research direction

Start with the book.toml source setting and the mdbook build error for wgpu-examples/src. Determine why that directory is treated as a book source despite the configured "src" path, then document or implement a way to keep the external example crate separate while allowing the preprocessor to link its examples.

Written by the indexing model from the issue text.

Description

C-question
Question

I'm trying to make a book about a Rust library. The problem is that 1. mdbook does not accept external crates and 2. the code examples are so big, I want to store them in a separate crate to test and then preprocessor link to the examples. The problem is that mdbook is trying to get a summary.md out of this sub crate. I get

mdbook build
2023-07-28 22:29:34 [ERROR] (mdbook::utils): Error: Couldn't open SUMMARY.md in "/Users/personal/Desktop/projects/unofficial-wgpu-book/wgpu-examples/src" directory
2023-07-28 22:29:34 [ERROR] (mdbook::utils):    Caused By: No such file or directory (os error 2)

How do I stop it from trying to use this directory for the source? I have the source directory specified in book.toml as "src".

Version
mdbook v0.4.32
Dominant language
Rust
Stars
22.2k
Forks
1.9k
Avg merge
2d 21h
Merged PRs (30d)
12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/mdBook

All issues in rust-lang/mdBook

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.