easy_rust icon indicating copy to clipboard operation
easy_rust copied to clipboard

createBookFromReadme.sh doesn't work

Open ilyakmet opened this issue 4 years ago • 1 comments

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

ilyakmet avatar Dec 19 '20 11:12 ilyakmet

image

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:

image

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:

image

To overcome this, we can add an Update heading to the start of README.md. image

Hope it solved your issue.

FongYoong avatar Dec 22 '20 12:12 FongYoong