|
| 1 | +# Metal3 Documentation - AI Coding Assistant Instructions |
| 2 | + |
| 3 | +## Project Overview |
| 4 | + |
| 5 | +Central documentation repository for the Metal3 project using Hugo |
| 6 | +static site generator. Contains architecture docs, user guides, API |
| 7 | +references, and deployment workflows. Published at |
| 8 | +<https://book.metal3.io> |
| 9 | + |
| 10 | +## Structure |
| 11 | + |
| 12 | +- `docs/` - Main documentation content (Markdown) |
| 13 | + - `user-guide/` - End-user documentation |
| 14 | + - `dev-env/` - Development environment setup |
| 15 | + - `api/` - API references |
| 16 | + - `architecture/` - Design documents |
| 17 | +- `themes/` - Hugo theme customization |
| 18 | +- `config.toml` - Hugo configuration |
| 19 | +- `Makefile` - Build and serve commands |
| 20 | + |
| 21 | +## Local Development |
| 22 | + |
| 23 | +```bash |
| 24 | +# Install Hugo |
| 25 | +# Ubuntu: sudo snap install hugo |
| 26 | +# macOS: brew install hugo |
| 27 | + |
| 28 | +# Serve docs locally with live reload |
| 29 | +make serve |
| 30 | + |
| 31 | +# Build static site |
| 32 | +make build |
| 33 | + |
| 34 | +# Output in docs/_site/ |
| 35 | +``` |
| 36 | + |
| 37 | +## Adding Documentation |
| 38 | + |
| 39 | +1. Create new Markdown file in appropriate `docs/` subdirectory |
| 40 | + |
| 41 | +2. Add frontmatter: |
| 42 | + |
| 43 | + ```yaml |
| 44 | + --- |
| 45 | + title: "Your Page Title" |
| 46 | + weight: 10 # Ordering in navigation |
| 47 | + --- |
| 48 | + ``` |
| 49 | + |
| 50 | +3. Write content in Markdown |
| 51 | + |
| 52 | +4. Test locally with `make serve` |
| 53 | + |
| 54 | +5. Submit PR |
| 55 | + |
| 56 | +## Documentation Guidelines |
| 57 | + |
| 58 | +- Use clear, concise language |
| 59 | +- Include code examples for technical content |
| 60 | +- Add diagrams for architecture/workflows (use mermaid or images) |
| 61 | +- Cross-link related pages |
| 62 | +- Keep API docs in sync with actual APIs |
| 63 | +- Test all commands/examples before publishing |
| 64 | + |
| 65 | +## Common Pitfalls |
| 66 | + |
| 67 | +1. **Broken Links** - Check internal links before committing |
| 68 | +2. **Outdated Content** - Update docs when APIs/features change |
| 69 | +3. **Missing Frontmatter** - Pages won't render properly without it |
| 70 | +4. **Build Errors** - Hugo strict mode catches many issues, fix before merge |
| 71 | + |
| 72 | +Documentation PRs should be reviewed for technical accuracy and clarity. When in doubt, ask project maintainers for guidance on organization and content. |
0 commit comments