Mdbook
The page you are viewing is made using mdbook with github pages.
https://crates.io/crates/mdbook
cargo install mdbook
mdbook init knowledge-base
cd knowledge-base
mdbook serve
mdbook-toc
Autogenerate a toc for every page.
https://crates.io/crates/mdbook-toc
cargo install mdbook-toc
Add the following block to book.toml
[preprocessor.toc]
command = "mdbook-toc"
renderer = ["html"]
mdbook-pagetoc
Display a toc on the right side of the page.
https://github.com/schlumpfit/mdBook-pagetoc
Add these three files to:
- ./style.css
- ./sidebar.js
- ./theme/index.hbs
Raw Files:
- https://raw.githubusercontent.com/schlumpfit/mdBook-pagetoc/master/style.css
- https://raw.githubusercontent.com/schlumpfit/mdBook-pagetoc/master/sidebar.js
- https://raw.githubusercontent.com/schlumpfit/mdBook-pagetoc/master/theme/index.hbs
Add the following block to book.toml
[output.html]
additional-css = ["style.css"]
additional-js = ["sidebar.js"]
mdbook-linkcheck
Check if all links are pointing somewhere.
https://crates.io/crates/mdbook-linkcheck
Add the following block to book.toml
[output.linkcheck]
follow-web-links = true
[output.linkcheck.http-headers]
'crates\.io' = ["Accept: text/html"]