How to add a chapter¶
Publish Markdown you own next to your product code into the internal Neuraverse documentation book under /guides/<name>/.
Fastest path
- Copy the Cursor skill into your repo (or
~/.cursor/skills/). - Ask Cursor: use add-neuraverse-docs-chapter to wire this project.
- Or include the CI catalog component and only set
ingest_project.
All steps, permissions, writing rules, and troubleshooting live in this chapter. Confluence is optional.
Big picture¶
flowchart LR
A[Product repo<br/>chapter.yml + docs/] -->|merge to default branch| B[Chapter CI]
B -->|INGEST_PROJECT<br/>INGEST_REF<br/>INGEST_CHAPTER_FILE| C[neuraverse-docs]
C --> D[ingest:chapter]
D --> E[build:internal]
E --> F[publish:internal]
F --> G["/guides/name/"]
| You own | Portal owns |
|---|---|
Markdown, chapter.yml, chapter CI |
Ingest script, MkDocs book, S3 / CloudFront publish |
| Job-token allowlist on your project | Trigger allowlist + OIDC publish |
Portal: neuraverse/documentation/neuraverse-docs
1. Prerequisites¶
- GitLab project under
neuraverse/(or another path DevOps can allowlist) - Permission to edit CI and open MRs
- MkDocs-friendly Markdown (headings, relative links, optional images)
2. Add the chapter package¶
At the repository root (or agreed path):
chapter.yml¶
name: my-service # URL: .../guides/my-service/
title: My Service # Nav title
docs_path: docs # Folder of Markdown to ingest
audience: internal # Guides are internal-only today
Rules:
name— kebab-case and stable (renaming creates a new URL)docs_path— directory with*.md(and assets)- Optional
docs/.pages— nav for the chapter
Markdown under docs/¶
docs/
index.md # landing page (required)
...
.pages # optional but recommended
assets/ # optional images
Tips:
- Relative links between pages in the same chapter
- Images under
docs/assets/ - Admonitions (
!!! note) are supported by the portal
Working template: this repository
neuraverse/documentation/neuraverse-docs-chapter-example
3. Wire CI (prefer catalog)¶
Option A — CI catalog (recommended)¶
stages:
- validate
- trigger
include:
- project: neuraverse/ci-catalog-docs-portal
ref: main
file: /templates/chapter-ingest/template.yml
inputs:
ingest_project: neuraverse/<your-group>/<your-project>
See Cursor skill + CI catalog for all inputs.
Option B — Inline jobs¶
Use when the catalog component is not available yet:
stages:
- validate
- trigger
validate:docs-chapter:
stage: validate
image: python:3.12-slim
script:
- test -f chapter.yml
- test -d docs
- grep -q '^name:' chapter.yml
- find docs -name '*.md' | grep .
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
trigger:docs-portal:
stage: trigger
needs: ["validate:docs-chapter"]
trigger:
project: neuraverse/documentation/neuraverse-docs
branch: main
strategy: depend
variables:
INGEST_PROJECT: neuraverse/<your-group>/<your-project>
INGEST_REF: $CI_COMMIT_SHA
INGEST_CHAPTER_FILE: chapter.yml
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: on_success
Replace INGEST_PROJECT with your full GitLab path.
4. Permissions (once per chapter project)¶
Without these, ingest fails with 403 or the trigger is denied.
-
On your chapter project
Settings → CI/CD → Job token permissions
Allowneuraverse/documentation/neuraverse-docsto clone this project withCI_JOB_TOKEN. -
On the portal project
Allow your chapter project to trigger pipelines.
Ask DevOps if you cannot change allowlists. Full table: CI and permissions.
5. Merge and verify¶
- Merge chapter package + CI to your default branch
- Confirm the child pipeline on
neuraverse-docs:
ingest:chapter→build:internal→publish:internal - Open
https://neuraverse-documentation.internal.neura-robotics.com/guides/<name>/
6. Temporary alternative (vendor)¶
If job-token allowlist is not ready, DevOps can vendor your docs into:
neuraverse/documentation/neuraverse-docs → docs/internal/guides/<name>/
Prefer CI ingest once permissions exist.