Crates.io | mdbook-auto-gen-summary |
lib.rs | mdbook-auto-gen-summary |
version | 0.1.10 |
source | src |
created_at | 2020-07-31 03:21:36.962089 |
updated_at | 2021-12-09 05:27:40.577939 |
description | A preprocessor and cli tool for mdbook to auto generate summary. |
homepage | https://crates.io/crates/mdbook-auto-gen-summary |
repository | https://github.com/knightflower1989/mdbook-auto-gen-summary |
max_upload_size | |
id | 271531 |
size | 58,423 |
A preprocessor and cli tool for mdbook to auto generate summary.
cargo install mdbook-auto-gen-summary
It can be use in two ways:
mdbook-auto-gen-summary gen /path/to/your/mdbook/src
or
mdbook-auto-gen-summary gen -t /path/to/your/mdbook/src # -t indicate mdbook to make the first line(default the file name) of markdown file as the link text in SUMMARY.md
This will walk your mdbook src dir and generate the book summary in /path/to/your/mdbook/src/SUMMARY.md
#cat /path/to/your/mdbook/book.toml
[book]
authors = []
language = "en"
multilingual = false
src = "src"
[build]
create-missing = false
#use as mdbook preprocessor
[preprocessor.auto-gen-summary]
first-line-as-link-text = true # indicate mdbook to make the first line(default the file name) of markdown file as the link text in SUMMARY.md
[output.html.fold]
enable = true
level = 0
When you run
mdbook serve
Or
mdbook build
this will also walk your mdbook src dir and generate the book summary in /path/to/your/mdbook/src/SUMMARY.md