|
| 1 | +# Repository Guidelines |
| 2 | + |
| 3 | +## Project Structure & Module Organization |
| 4 | +- `docs/`: primary documentation sources in MDX (mostly standard Markdown with a few MDX components). |
| 5 | +- `static/img/assets/`: image assets referenced by docs; use lowercase filenames with no spaces. |
| 6 | +- `src/`: custom React components and styling overrides (notably `src/css/custom.css`). |
| 7 | +- `sidebars.ts`: main navigation structure. |
| 8 | +- `docusaurus.config.ts`: site configuration (theme, plugins, metadata). |
| 9 | +- `build/`: generated static output (do not edit by hand). |
| 10 | + |
| 11 | +## Build, Test, and Development Commands |
| 12 | +- `npm install`: install dependencies (Node >= 18). |
| 13 | +- `npm run start`: start the local Docusaurus dev server. |
| 14 | +- `npm run build`: build the static site into `build/`. |
| 15 | +- `npm run serve`: serve the built site locally for verification. |
| 16 | +- `npm run typecheck`: run TypeScript checks for config and custom code. |
| 17 | +- `npm run clear`: clear Docusaurus cache if the build acts stale. |
| 18 | + |
| 19 | +## Coding Style & Naming Conventions |
| 20 | +- MDX: keep Markdown clean and readable; prefer standard Markdown unless MDX components are needed. |
| 21 | +- Images: only lowercase filenames, no spaces (e.g. `static/img/assets/vector-search.png`). |
| 22 | +- Config/TS: follow existing formatting; no repo-wide formatter is configured. |
| 23 | + |
| 24 | +## Testing Guidelines |
| 25 | +- No automated test suite is defined in this repo. |
| 26 | +- Use `npm run typecheck` to validate TS config changes. |
| 27 | +- For doc changes, verify locally with `npm run start` or `npm run serve`. |
| 28 | + |
| 29 | +## Commit & Pull Request Guidelines |
| 30 | +- Commit messages in recent history are short, sentence-case imperatives (e.g. "Fix a couple of typos", "Update to ObjectBox 5.0"). |
| 31 | +- PRs should include: a clear summary, relevant links (issues or source material), and screenshots for visual/UI changes. |
| 32 | +- Note any content-impacting changes (navigation, config, or assets) in the PR description. |
| 33 | + |
| 34 | +## How-To: Update ObjectBox Version |
| 35 | +- First update the changelog in `docs/README.mdx` with the new version and date (manual step done by a human). |
| 36 | +- Identify the previous version, then search for that exact version string across the repo to find all references that may need a bump. |
| 37 | +- After the changelog entry is in place, update version references across the docs. |
| 38 | +- Default to updating runtime library references only; the generator has separate versioning and updates less frequently. |
| 39 | +- Only update generator references if the changelog explicitly calls out a generator version bump. |
| 40 | +- Runtime references live in `docs/installation.mdx` (`GIT_TAG vX.Y.Z` and download folder examples). |
| 41 | +- Generator references live in `docs/installation.mdx`, `docs/getting-started.mdx`, and `docs/generator.mdx` (`find_package(ObjectBoxGenerator X.Y.Z REQUIRED)` and version string examples). |
| 42 | +- Keep changes in sync so the docs and examples reference the correct release(s). |
| 43 | +- If the search reveals new version locations, update this list in `AGENTS.md` so future bumps include them. |
| 44 | + |
| 45 | +## Notes for Contributors |
| 46 | +- Main content lives in `docs/`; keep navigation in sync via `sidebars.ts`. |
| 47 | +- When adding new pages, ensure links are valid; `onBrokenLinks` is set to `throw`. |
0 commit comments