#documentation #doc #module #markdown

app cargo-modoc

Generate module documentation from markdown files

4 stable releases

1.2.0 Mar 27, 2020
1.1.0 Dec 18, 2019
1.0.1 Aug 22, 2019
1.0.0 Feb 27, 2019

#160 in Cargo plugins

Download history 3/week @ 2021-08-17 2/week @ 2021-08-24 1/week @ 2021-09-07 6/week @ 2021-09-28 9/week @ 2021-10-05 1/week @ 2021-10-12 6/week @ 2021-10-19 1/week @ 2021-10-26 5/week @ 2021-11-02 9/week @ 2021-11-09 25/week @ 2021-11-16 25/week @ 2021-11-23 20/week @ 2021-11-30

82 downloads per month

MIT license

8KB
107 lines

Build Status Latest Version Rust Documentation codecov

Generate Rust module documentation from markdown files.

Apply module documentation to a source file from a markdown file. This binary takes a markdown file and prepends a source file with the module documentation comments (//!). There is a configuration file at the root directory (modoc.config) which defines which markdown files are to prepend which source files, in a single input multiple output fashion.

To get started, use cargo to install the binary.

cargo install cargo-modoc

A configuration file needs to be set up.

# Commends are allowed
"README.md" = [ "src/main.rs", "src/lib.rs" ]

A single markdown file can apply to multiple source files.

Run the binary to write the markdown contents to the source files.

cargo modoc

The binary will read the contents of the markdown file and prepend the source file with the line comments (//!). If there are any lines in the source file which start with //! then these lines are not included (hence the documentation is overwritten).

No runtime deps

}^