docs-ng: Garden Linux Documentation Hub
Build unified documentation from multiple Garden Linux repositories.
Source Repository: gardenlinux/docs-ng
Overview
docs-ng is the documentation aggregation system that powers the unified Garden Linux documentation site. It aggregates content from multiple source repositories (gardenlinux, builder, python-gardenlinux-lib) into a cohesive VitePress site.
Key Features
- Targeted Documentation: Files with
github_target_pathfrontmatter are automatically placed into the correct Diataxis categories - Project Mirroring: Complete repository documentation mirrored under
docs/projects/<repo-name>/ - Commit Locking: Reproducible builds with locked commit hashes
- Media Handling: Automatic discovery and copying of media directories
- Link Rewriting: Automatic link transformation for cross-repository references
Documentation Paths
The system supports two complementary documentation paths:
- Targeted Documentation — Files with
github_target_pathfrontmatter →docs/tutorials/,docs/how-to/, etc. - Project Mirror — All repo docs mirrored under
docs/projects/<repo-name>/
Quick Start
bash
# Aggregate documentation from repos
make aggregate
# Run development server
make dev
# Build production site
make buildArchitecture Overview
Source Repos → Fetch (git/local) → Transform → docs/ → VitePressThe aggregation pipeline consists of four main stages:
- Fetch —
src/aggregation/fetcher.pypulls docs via git sparse checkout or local copy - Transform —
src/aggregation/transformer.pyrewrites links, fixes frontmatter - Structure —
src/aggregation/structure.pyreorganizes directories and copies media - Output — VitePress builds the site
Project Structure
docs-ng/
├── repos-config.json # Repository configuration
├── repos-config.local.json # Local development config
├── src/ # Source code
│ ├── aggregate.py # CLI entry point
│ └── aggregation/ # Core package
├── tests/ # Test suite
└── docs/ # Generated documentation
├── projects/ # Mirrored repository docs
├── tutorials/ # Aggregated tutorials
├── how-to/ # Aggregated guides
├── explanation/ # Aggregated explanations
└── reference/ # Aggregated reference docsFurther Reading
- Getting Started Tutorial — Step-by-step guide to using docs-ng
- Adding Repositories — How to add new repositories to the aggregation
- Technical Reference — Source code and API documentation
- Configuration Reference — Complete configuration options
- Architecture Explanation — Deep dive into how docs-ng works
Contributing
See the docs-ng repository for contribution guidelines.