feat(mkdocs): cli postprocessing support

That way, a single huge markdown file containing documentation for
commands and methods can be split up into multiple files for
individual inclusion in mkdocs.

It's done by a post-processor which is loaded by mako-render, providing
access to the entire context. Said processor may also drop results
altogether and thus prevent files to be written that have been split up
by it.
This commit is contained in:
Sebastian Thiel
2015-04-10 13:02:36 +02:00
parent 2e74d91413
commit c78ea5381a
7 changed files with 81 additions and 7 deletions

View File

@@ -2,6 +2,10 @@ mkdocs:
## A directory to bring us from the mkdocs invocation directory to the gen-root
gen_root_dir: ..
site_dir: build_html
# if docs_dir changes, remember to update the sources as well.
docs_dir: docs
mako:
post_processor_module: cli
make:
id: cli
target_name: CLIs
@@ -12,6 +16,7 @@ make:
templates:
- source: ../LICENSE.md
- source: ../Cargo.toml
- source: docs/commands.yml
- source: mkdocs.yml
- source: README.md
- source: main.rs