Crates.io | cargo-external-doc |
lib.rs | cargo-external-doc |
version | 0.2.0 |
source | src |
created_at | 2016-11-13 19:28:26.259357 |
updated_at | 2019-08-22 16:29:23.17703 |
description | add long text articles to your crate's documentation |
homepage | |
repository | https://github.com/Geal/cargo-external-doc |
max_upload_size | |
id | 7243 |
size | 24,482 |
This tool allows you to add markdown files to your crate's documentation generated with rustdoc.
The documentation generated by rustdoc
is meant for code and API references,
and does not offer a nice way to add long form documentation. This tool
will fix that until rustlang/cargo#739
is implemented.
cargo external-doc
is installed via cargo install
:
$ cargo install cargo-external-doc
Put your articles written in markdown in the doc/
subfolder of your
project (see nom for an example).
rustdoc
requires that the files are prefixed with a title like this:
% Your title here
Now, run cargo build
then cargo external-doc
. This tool will:
cargo doc
doc/
rustdoc
's templates and put them in target/doc/your_crate
Your other documentation files can reference it by relative URL, like this for a doc/guide.md
file:
cf the [guide](guide.html)
In nom, you can see:
doc/
foldersrc/lib.rs
This tool is a temporary solution, until something better is
integrated in cargo doc
.
It does not support overriding values like the target path.
It relies on the target/debug/libyourcrate.rlib
file existing.
It does not check for invalid links.
It is not configurable.
It fits a need I have for nom, and it might
not fit what you want. I'm open to modification ideas and patches, but I'd
prefer to see it implemented correctly in cargo doc
instead.