- Pin TypeScript as a direct dependency. It was only present transitively via typescript-eslint, so nothing enforced tsconfig.json and nine latent type errors had gone unnoticed. - Add `pnpm typecheck` (`tsc --noEmit`) and document it. - Add .npmrc with engine-strict, so the declared Node and pnpm ranges are actually enforced. - Ignore doc_build/ in ESLint. It was unignored and reported 1650 errors from build output, which made lint unusable as a gate. - Refresh README, CLAUDE.md, AGENTS.md and CONTRIBUTING.md to match the current structure, build targets and navigation rules.
1.7 KiB
1.7 KiB
Contributing to OnixByte Homepage
Development Setup
This project uses Rspress as the static site framework and pnpm as the package manager.
pnpm install
pnpm dev
Project Structure
docs/ # Content (Markdown/MDX), organised by locale
en-gb/ # British English content
zh-hans/ # Simplified Chinese content
theme/ # Custom theme overrides
Content Guidelines
- Write content in both English (British) and Simplified Chinese. British
spelling is required throughout — interface text, documentation, code
comments and commit messages (
customised,centre,colour, and so on). - Blog posts and documentation articles are licensed under CC-BY-4.0.
- Code contributions are licensed under MIT.
Navigation and Sidebars
Navigation and sidebar structure live in JSON files beside the content, not in the theme:
_nav.jsonsets the top navigation. Itstextvalues are i18n keys resolved throughi18n.json, so theen-gbandzh-hanscopies stay identical. Add new keys toi18n.jsonfor both locales — a key present for only one locale fails the build._meta.jsonsets sidebar grouping and ordering within a directory. Supplying one replaces the generated listing for that directory, so every page you want shown must be listed — anything omitted disappears from the sidebar silently.
Do not add a _meta.json next to _nav.json at the root of a locale
directory; doing so collapses the whole site into one flat sidebar.
Pull Request Process
- Ensure the site builds cleanly:
pnpm build - Run linting:
pnpm lint - If adding a new page, include both
en-gbandzh-hansversions.