recon_gen.cli.docs
recon-gen docs — mkdocs handbook site for an L2 instance.
Six operations:
apply — build the site to
site/(wrapsmkdocs build). serve — live-reload preview (wrapsmkdocs serve). clean —rm -rf site/. test — pytest the docs gates (link sweep + persona neutrality). export — extract mkdocs source for hand-build (legacyexport docs). screenshot — capture deployed dashboards to PNG (legacyexport screenshots).
No --execute here — building a static site to a directory isn’t
a destructive side effect. The “emit” and the “do it” are the same
operation.
The --l2 flag is honored via the QS_DOCS_L2_INSTANCE env var
that main.py reads at mkdocs-macros define-env time.
Functions
|
Run |
|
Parse a |
- recon_gen.cli.docs.build_docs_site(l2_instance_path, output_dir, *, strict=True, config=None)[source]
Run
mkdocs build(the bundled config) intooutput_dir.Returns the mkdocs exit code (0 = success). Threads the active L2 instance via
QS_DOCS_L2_INSTANCEand setscwdto the bundled config’s directory so mkdocs-macros’sinclude_dir: docs/_macrosresolves (X.2.s.1 — mkdocs-macros joinsinclude_diragainst the process cwd, not the config-file dir).configoverrides the config file (docs apply --portablepasses its synthesizedmkdocs.portable.yml); the default is the bundledmkdocs.yml.output_diris resolved to absolute so cwd doesn’t affect where the site lands.Shared by
docs applyand bydashboards/studio(which builds the site into a tempdir and embeds it at/docs— X.2.i).- Return type:
int- Parameters:
l2_instance_path (str | None)
output_dir (str | Path)
strict (bool)
config (Path | None)