Skip to main content

docgen_rs/
lib.rs

1//! # docgen — a Cargo-only static documentation-site generator
2//!
3//! **No npm, no Node.** `docgen` turns a `docs/` tree of Markdown files into a
4//! fast, fully static site: server-side syntax highlighting, `[[wikilinks]]`
5//! with backlinks, a zero-JS-build search index, an interactive git-history
6//! timeline, a knowledge graph, and Obsidian-style `.base` views — all rendered
7//! ahead of time.
8//!
9//! Most users want the **command-line tool**, not this library:
10//!
11//! ```sh
12//! cargo install docgen-rs      # installs the `docgen` binary
13//! docgen init my-docs
14//! docgen dev my-docs           # live-reload preview
15//! docgen build my-docs         # static site in ./dist
16//! ```
17//!
18//! The full user guide lives at <https://iammaxim.github.io/docgen-rs/>.
19//!
20//! ## Using docgen as a library
21//!
22//! `docgen-rs` is a thin CLI over a Cargo workspace of focused library crates.
23//! This crate re-exports them so the whole public API is browsable from one
24//! place; depend on the individual crates directly for a leaner build.
25//!
26//! | Re-export | Crate | Responsibility |
27//! |-----------|-------|----------------|
28//! | [`core`] | `docgen-core` | Document model, discovery, sidebar tree, pipeline |
29//! | [`render`] | `docgen-render` | HTML rendering (pages, graph, history, diff) |
30//! | [`build`] | `docgen-build` | The `build` orchestration that ties it together |
31//! | [`server`] | `docgen-server` | The `dev` live-reload server |
32//! | [`diff`] | `docgen-diff` | Git-history diffing (the `/diff/` timeline) |
33//! | [`assets`] | `docgen-assets` | Vendored CSS/JS and static assets |
34//! | [`init`] | `docgen-init` | Site scaffolding (`docgen init`) |
35//! | [`lint`] | `docgen-lint` | Pre-publish link/asset/frontmatter checks |
36//! | [`plantuml`] | `docgen-plantuml` | Build-time PlantUML diagram rendering |
37
38/// Vendored CSS/JS and static assets. See [`docgen_assets`].
39pub use docgen_assets as assets;
40/// Build orchestration (`docgen build`). See [`docgen_build`].
41pub use docgen_build as build;
42/// Document model, discovery, sidebar tree, and pipeline. See [`docgen_core`].
43pub use docgen_core as core;
44/// Git-history diffing behind the `/diff/` timeline. See [`docgen_diff`].
45pub use docgen_diff as diff;
46/// Site scaffolding (`docgen init`). See [`docgen_init`].
47pub use docgen_init as init;
48/// Pre-publish link/asset/frontmatter checks (`docgen lint`). See [`docgen_lint`].
49pub use docgen_lint as lint;
50/// Build-time PlantUML diagram rendering. See [`docgen_plantuml`].
51pub use docgen_plantuml as plantuml;
52/// HTML rendering of pages, graph, history, and diff. See [`docgen_render`].
53pub use docgen_render as render;
54/// The `dev` live-reload server. See [`docgen_server`].
55pub use docgen_server as server;