Neumann documentation consists of:
- mdBook (
docs/book/) - Conceptual docs, tutorials, operations - rustdoc - API reference generated from source
- README.md per crate - Quick overview
docs/book/src/
├── SUMMARY.md # Table of contents
├── introduction.md # Landing page
├── tutorials/ # Learning-oriented guides
├── how-to/ # Goal-oriented recipes
├── reference/ # Information-oriented tables
├── explanation/ # Understanding-oriented discussion
└── contributing/ # Contribution guides
# Page Title
Brief introduction (1-2 paragraphs).
## Section 1
Content with examples.
### Subsection
More detail.
## Section 2
Use tables for structured data:
| Column 1 | Column 2 |
|----------|----------|
| Value 1 | Value 2 |
Use mermaid for diagrams:
\`\`\`mermaid
flowchart LR
A --> B --> C
\`\`\`Use mdbook-admonish syntax:
```admonish note
This is a note.This is a warning.
This is dangerous.
## Writing Rustdoc
### Module Documentation
```rust
//! # Module Name
//!
//! Brief description (one line).
//!
//! ## Overview
//!
//! Longer explanation of purpose and design decisions.
//!
//! ## Example
//!
//! ```rust
//! // Example code
//! ```/// Brief description of the type.
///
/// Longer explanation if needed.
///
/// # Example
///
/// ```rust
/// let value = MyType::new();
/// ```
pub struct MyType { ... }Document:
- All public types
- Non-obvious behavior
- Complex algorithms
Don't document:
- Self-explanatory methods (
get,set,new) - Trivial implementations
cd docs/book
mdbook build
mdbook serve # Local preview at localhost:3000cargo doc --workspace --no-deps --open# mdBook
cd docs/book && mdbook build
# rustdoc
cargo doc --workspace --no-deps
# Combine
cp -r target/doc docs/book-output/api/cd docs/book
mdbook-linkcheck --standaloneSupported diagram types:
flowchart- Flow diagramssequenceDiagram- Sequence diagramsstateDiagram-v2- State machinesclassDiagram- Class diagramsgantt- Gantt charts
Example:
\`\`\`mermaid
sequenceDiagram
participant C as Client
participant S as Server
C->>S: Request
S->>C: Response
\`\`\`