#mdbook #markdown #summary

app mdbook-auto-gen-summary

A preprocessor and cli tool for mdbook to auto generate summary

10 releases

0.1.9 Feb 1, 2021
0.1.8 Feb 1, 2021
0.1.6 Aug 1, 2020
0.1.4 Jul 31, 2020

#435 in Command line utilities

Download history 3/week @ 2021-08-09 22/week @ 2021-08-16 1/week @ 2021-08-23 2/week @ 2021-08-30 4/week @ 2021-09-06 2/week @ 2021-09-13 3/week @ 2021-09-20 16/week @ 2021-09-27 1/week @ 2021-10-04 12/week @ 2021-10-11 3/week @ 2021-10-18 3/week @ 2021-10-25 4/week @ 2021-11-01 24/week @ 2021-11-08 24/week @ 2021-11-15 27/week @ 2021-11-22

105 downloads per month

MIT license

17KB
289 lines

mdbook-auto-gen-summary

A preprocessor and cli tool for mdbook to auto generate summary.

install

cargo install mdbook-auto-gen-summary

It can be use in two ways:

1. Use as a cli tool.

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

2. Use as mdbook preprocessor.

#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

Dependencies

~9.5MB
~185K SLoC

`