How To Write Docs – wpcamp-hub
Purpose
Section titled “Purpose”This repository keeps documentation close to the code or knowledge it describes while preserving a central docs tree for browsing and future docs platform builds.
Where Docs Live
Section titled “Where Docs Live”- Package-specific docs live in
packages/<package-name>/docs. - Package docs are exposed from
docs/packages/<package-name>with a symlink to../../packages/<package-name>/docs. - Shared cross-package docs live directly in
docs. - Repository setup and maintainer conventions live in
docs/setup.
Edit package docs through packages/<package-name>/docs, not through the symlink path in docs/packages.
Frontmatter
Section titled “Frontmatter”Every documentation Markdown or MDX file under docs/** or packages/*/docs/** needs frontmatter with title, description, and visibility.
---title: My Doc Titledescription: One sentence describing what this page helps readers understand or do.visibility: public---Use these visibility values:
publicmeans the page is eligible to be shown in a centralized docs platform.internalmeans the page is developer-facing and should remain visible only in this repository.
Use visibility: internal for setup, maintainer, workflow, agent-facing, and local development docs. Use visibility: public only for content that should be published to readers outside the development team.
Do not add docs visibility frontmatter to machine-read Markdown files that have their own schema, such as .agents/**/SKILL.md.
Package Docs
Section titled “Package Docs”When a package needs docs:
- Create
packages/<package-name>/docs. - Add package docs with the required frontmatter.
- Create a symlink from
docs/packages/<package-name>to../../packages/<package-name>/docs. - Update shared docs only when the information applies across packages.
ln -s ../../packages/<package-name>/docs docs/packages/<package-name>Shared Docs
Section titled “Shared Docs”Create files directly under docs only for shared knowledge that applies across packages. Prefer a package docs folder when the content explains one package’s behavior, API, setup, or release process.