Skip to main content

Crate docgen_rs

Crate docgen_rs 

Source
Expand description

§docgen — a Cargo-only static documentation-site generator

No npm, no Node. docgen turns a docs/ tree of Markdown files into a fast, fully static site: server-side syntax highlighting, [[wikilinks]] with backlinks, a zero-JS-build search index, an interactive git-history timeline, a knowledge graph, and Obsidian-style .base views — all rendered ahead of time.

Most users want the command-line tool, not this library:

cargo install docgen-rs      # installs the `docgen` binary
docgen init my-docs
docgen dev my-docs           # live-reload preview
docgen build my-docs         # static site in ./dist

The full user guide lives at https://iammaxim.github.io/docgen-rs/.

§Using docgen as a library

docgen-rs is a thin CLI over a Cargo workspace of focused library crates. This crate re-exports them so the whole public API is browsable from one place; depend on the individual crates directly for a leaner build.

Re-exportCrateResponsibility
coredocgen-coreDocument model, discovery, sidebar tree, pipeline
renderdocgen-renderHTML rendering (pages, graph, history, diff)
builddocgen-buildThe build orchestration that ties it together
serverdocgen-serverThe dev live-reload server
diffdocgen-diffGit-history diffing (the /diff/ timeline)
assetsdocgen-assetsVendored CSS/JS and static assets
initdocgen-initSite scaffolding (docgen init)
lintdocgen-lintPre-publish link/asset/frontmatter checks
plantumldocgen-plantumlBuild-time PlantUML diagram rendering

Re-exports§

pub use docgen_assets as assets;
pub use docgen_build as build;
pub use docgen_core as core;
pub use docgen_diff as diff;
pub use docgen_init as init;
pub use docgen_lint as lint;
pub use docgen_plantuml as plantuml;
pub use docgen_render as render;
pub use docgen_server as server;