Getting Started Tutorial
Getting Started with DocBuilder
This tutorial walks you through producing a multi‑repository Hugo documentation site in minutes.
Prerequisites
- Go toolchain (>=1.21) installed.
- Hugo installed (optional unless you want automatic static rendering).
- Git access tokens / SSH keys for the repositories you want to aggregate.
1. Install / Build
2. Initialize Configuration
This creates a starter config.yaml you can customize.
3. Add Repositories
Edit config.yaml and list repositories:
4. Run a Build
On success you’ll have:
site/hugo.yaml(generated Hugo config)site/content/<repo>/...(orcontent/<forge>/<repo>/...if multi‑forge)- Optional
site/public/if Hugo rendering enabled site/build-report.jsonwith metrics (doc_files_hashfingerprint)
5. Serve (Optional)
If you enabled Hugo rendering (for example with --render-mode always), serve the generated site directly:
Or run Hugo manually afterwards:
6. Incremental Workflow
Enable incremental builds to skip unchanged repositories:
On subsequent runs, DocBuilder will:
- Check cached build manifests
- Skip builds if inputs haven’t changed
- Significantly speed up CI pipelines
7. Multi-Version Documentation (Optional)
To build documentation from multiple branches/tags:
This will:
- Discover all matching branches/tags
- Clone each version separately
- Generate version-specific content paths
- Create Hugo config with version metadata
Re-run:
You’ll see logs about unchanged repository heads and (when applicable) an unchanged documentation set.
7. Next Steps
- Customize landing pages with
templates/index/*.tmpl. - Pick a supported theme (
hextra,docsy, orrelearn). - Integrate with CI: compare
doc_files_hashbetween runs to skip downstream jobs.
You are ready to explore How‑To guides for specific tasks.