Files
onixbyte.com/CONTRIBUTING.md
T
zihluwang 29f7411da5 chore: pin toolchain and add type checking
- 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.
2026-09-25 14:48:25 +08:00

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.json sets the top navigation. Its text values are i18n keys resolved through i18n.json, so the en-gb and zh-hans copies stay identical. Add new keys to i18n.json for both locales — a key present for only one locale fails the build.
  • _meta.json sets 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

  1. Ensure the site builds cleanly: pnpm build
  2. Run linting: pnpm lint
  3. If adding a new page, include both en-gb and zh-hans versions.