easy_rust
easy_rust copied to clipboard
createBookFromReadme.sh doesn't work
macOS 10.15.7
bash createBookFromReadme.sh
2020-12-19 14:48:44 [WARN] (mdbook::book::summary): Expected a start of a link, actually got Some(Text(Borrowed("[")))
2020-12-19 14:48:44 [ERROR] (mdbook::utils): Error: Summary parsing failed
2020-12-19 14:48:44 [ERROR] (mdbook::utils): Caused By: There was an error parsing the numbered chapters
2020-12-19 14:48:44 [ERROR] (mdbook::utils): Caused By: There was an error parsing the numbered chapters
2020-12-19 14:48:44 [ERROR] (mdbook::utils): Caused By: failed to parse SUMMARY.md line 3, column 3: The link items for nested chapters must only contain a hyperlink
As shown above, I had the same issue too.
Clearly, the problem lies in mdbook build
.
The createBookFromReadme.sh
script consists of multiple build functions and it fails at buildAndServeBookLocally
due to the mdbook build
error as illustrated below:
Inspecting the SUMMARY.md file generated by createBookFromReadme.sh
, we find that the highlighted line is the root cause of this issue. In fact, it's actually the first line of README.md:
To overcome this, we can add an Update heading to the start of README.md.
Hope it solved your issue.