Guidance for AI coding agents working in this repository.
This repository contains the NetDaemon documentation site. It is a Docusaurus 3 static site hosted on Netlify.
Primary areas:
docs/- documentation pages, mostly Markdown.sidebars.js- documentation navigation and sidebar structure.docusaurus.config.js- site metadata, navbar, footer, Docusaurus presets, themes, Prism languages, and search config.src/pages/- custom React pages for the site.src/css/custom.css- global Docusaurus theme overrides.static/- images, favicons, redirects, and other static assets.
- Use Node 20 when possible. The repo has
.nvmrcset to20;package.jsonallows Node>=18.0.0. - Use Yarn v1. The scripts are defined in
package.json. yarn.lockis ignored by Git in this repo. Do not assume lockfile changes will be part of a commit unless the ignore policy changes.
Common commands:
yarn install
yarn start
yarn build
yarn serveUse yarn build as the main validation command before finishing changes that affect docs, config, navigation, styles, assets, or dependencies.
- Keep documentation changes scoped and factual. This is user-facing product documentation, not an implementation scratchpad.
- Preserve existing page structure and heading style unless a restructuring is part of the task.
- When adding or renaming docs pages, update
sidebars.jsso the page is reachable from navigation. - When moving or deleting docs pages, check links and sidebar IDs. Docusaurus document IDs may differ from filenames when front matter defines an explicit ID.
- Use relative links for internal docs links where practical.
- Put images and other static files under
static/, then reference them using site-root paths such as/img/example.png. - Mermaid diagrams are enabled. Use fenced
mermaidblocks for diagrams. - C# and PowerShell syntax highlighting are configured in
docusaurus.config.js; prefer explicit language tags on code blocks. - Keep generated output out of commits:
build/,.docusaurus/,node_modules/, and other ignored artifacts should remain untracked.
- Keep Docusaurus packages aligned to the same version:
@docusaurus/core@docusaurus/preset-classic@docusaurus/theme-mermaid
- After dependency updates, run
yarn build. - If updating dependencies, check current package metadata first rather than assuming known versions are current.
- The local search package is
@easyops-cn/docusaurus-search-local; verify compatibility before changing major Docusaurus versions or replacing search behavior.
Before handing off, run the smallest useful validation for the change:
- Docs-only Markdown change:
yarn build. - Sidebar, Docusaurus config, React page, CSS, or dependency change:
yarn build. - Visual/layout-sensitive change: also run
yarn startand inspect the affected page in a browser when available.
Known benign warnings may appear from Yarn cache location or Docusaurus update checks in restricted environments. Treat build failures, broken links, missing docs IDs, and Markdown/MDX syntax errors as real issues to fix.
- Do not revert unrelated local changes.
- Prefer focused diffs over broad formatting churn.
- Do not edit generated files by hand.
- If a task requires deleting docs or assets, confirm that no sidebar entries, Markdown links, or static references still point to them.