11 个版本
0.1.10 | 2021 年 12 月 9 日 |
---|---|
0.1.9 | 2021 年 2 月 1 日 |
0.1.6 | 2020 年 8 月 1 日 |
0.1.4 | 2020 年 7 月 31 日 |
在 文本处理 中排名第 892
每月下载量 58
17KB
292 行
mdbook-auto-gen-summary
mdbook 的预处理和命令行工具,用于自动生成摘要。
安装
cargo install mdbook-auto-gen-summary
它可以通过两种方式使用
1. 作为命令行工具使用。
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
这将遍历您的 mdbook 源目录,并在 /path/to/your/mdbook/src/SUMMARY.md 中生成书籍摘要
2. 作为 mdbook 预处理器使用。
#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
当您运行
mdbook serve
或者
mdbook build
这将遍历您的 mdbook 源目录,并在 /path/to/your/mdbook/src/SUMMARY.md 中生成书籍摘要
依赖项
~12–24MB
~343K SLoC