Skip to content

Commit e679d4b

Browse files
authored
chore(docs): update contributing for docs (#80)
Signed-off-by: aagonzales <aagonzales@nvidia.com>
1 parent 17d6ce7 commit e679d4b

3 files changed

Lines changed: 74 additions & 155 deletions

File tree

CONTRIBUTING.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Please read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing.
1717
- [Developer Certificate of Origin](#developer-certificate-of-origin)
1818
- [Testing](#testing)
1919
- [Code Style](#code-style)
20+
- [Documentation](#documentation)
2021

2122
## Getting Started
2223

@@ -318,6 +319,79 @@ prek install
318319

319320
This installs hooks that run Ruff (format + lint), ty type checking, and uv lock verification on each commit.
320321

322+
## Documentation
323+
324+
This project uses [MkDocs Material](https://squidfunk.github.io/mkdocs-material/) for its documentation site, hosted at <https://nvidia-nemo.github.io/Safe-Synthesizer/>.
325+
326+
### Local Preview
327+
328+
Documentation dependencies are included in the `dev` bootstrap profile. If you already ran `make bootstrap-nss dev` (or `cpu`/`cuda`), you're set. Otherwise install them directly:
329+
330+
```bash
331+
uv sync --group docs
332+
```
333+
334+
Start a local server with live reload:
335+
336+
```bash
337+
make docs-serve
338+
# Browse to http://127.0.0.1:8000
339+
```
340+
341+
Build the static site (output in `site/`):
342+
343+
```bash
344+
make docs-build
345+
```
346+
347+
### Directory Layout
348+
349+
All documentation lives under `docs/`. The structure follows the [Diataxis](https://diataxis.fr/) framework:
350+
351+
| Directory | Content type | Examples |
352+
| --- | --- | --- |
353+
| `getting-started/` | Tutorials | Installation, quick start |
354+
| `user-guide/` | How-tos & reference | CLI, configuration, SDK |
355+
| `architecture/` | Explanations | Design decisions |
356+
| `reference/` | API reference | Auto-generated (see below) |
357+
| `blog/` | Dev notes | Release notes, design posts |
358+
359+
### Adding or Editing a Page
360+
361+
1. Create or edit the `.md` file under the appropriate `docs/` subdirectory.
362+
2. Add the page to the `nav:` section of `mkdocs.yml` so it appears in the sidebar.
363+
3. Run `make docs-serve` and verify the page renders correctly.
364+
365+
### MkDocs Material Features
366+
367+
The site configuration (`mkdocs.yml`) enables several useful Markdown extensions:
368+
369+
- **Admonitions** -- callout boxes (`!!! note`, `!!! warning`, `??? tip` for collapsible)
370+
- **Content tabs** -- tabbed content blocks (`=== "Python SDK"` / `=== "CLI"`)
371+
- **Code blocks** -- syntax highlighting, line numbers, copy button, and annotations
372+
- **Mermaid diagrams** -- fenced code blocks with ` ```mermaid `
373+
- **Task lists**, **footnotes**, **definition lists**, and **emoji**
374+
375+
See the [MkDocs Material reference](https://squidfunk.github.io/mkdocs-material/reference/) for full syntax.
376+
377+
### API Reference
378+
379+
API reference pages are auto-generated from Python docstrings. The `mkdocstrings` and `gen-files` plugins run `docs/gen_ref_pages.py` at build time to produce pages under `reference/`. You do not need to edit these files manually -- just write Google-style docstrings in `src/nemo_safe_synthesizer/` and they will appear on the next build.
380+
381+
### Deployment
382+
383+
Documentation is deployed to GitHub Pages automatically when changes to `docs/`, `mkdocs.yml`, or `src/` are pushed to `main`. The workflow is defined in `.github/workflows/docs.yml`.
384+
385+
## AI Agents
386+
387+
This project supports AI coding assistants (Cursor, Windsurf, Claude Code). Key files:
388+
- **AGENTS.md** -- primary agent guide
389+
- **.agent/skills/** -- domain-specific skills (canonical location)
390+
- **.cursor/rules/** -- Cursor workflow rules
391+
- **.cursor/skills/** -- symlinks to `.agent/skills/` for Cursor discoverability
392+
393+
Before contributing, run `make format` and `make lint`. See AGENTS.md for full conventions.
394+
321395
---
322396

323397
Thank you for contributing to NeMo Safe Synthesizer!

docs/contributing/index.md

Lines changed: 0 additions & 153 deletions
This file was deleted.

mkdocs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,5 @@ nav:
158158
- Tutorials:
159159
- tutorials/index.md
160160
- API Reference: reference/
161-
- Contributing:
162-
- contributing/index.md
163161
- Dev Notes:
164162
- blog/index.md

0 commit comments

Comments
 (0)