A modern, multilingual website built with React, TypeScript, and Vite.
Before you begin, ensure you have the following installed:
- Node.js v20.x or higher (Download here)
- Corepack (included with Node.js 16.9+)
This project uses Yarn 4.x, which requires Corepack to be enabled:
corepack enableNote: Corepack is included by default with Node.js 16.9+ and will automatically use the correct Yarn version specified in
package.json.
Windows Users: You need to run this command in PowerShell as Administrator (Win + X → "Terminal (Admin)"). This is a one-time setup.
yarn installIf you encounter engine compatibility issues with the sharp package, use:
yarn add sharp
# The YARN_IGNORE_NODE environment variable can be set if neededyarn devThe development server will start at http://localhost:5173 (or another available port).
| Command | Description |
|---|---|
yarn dev |
Start development server with HMR |
yarn build |
Build for production |
yarn preview |
Preview production build locally |
yarn lint |
Run ESLint to check code quality |
yarn format |
Format code with Prettier |
yarn format:check |
Check code formatting without making changes |
- Framework: React 18 with TypeScript
- Build Tool: Vite 6
- Styling: Styled Components with Ant Design
- Internationalization: i18next
- Routing: React Router v6
- Package Manager: Yarn 4.12.0 (Berry)
This project supports multiple languages:
- English (en)
- Traditional Chinese (zh_TW)
- Simplified Chinese (zh_CN)
Translations are managed via Crowdin.
The website is automatically deployed to GitHub Pages via GitHub Actions when changes are pushed to the main branch.
-
Build the project:
yarn build
-
Deploy the
distfolder to your hosting service.
The project uses GitHub Actions for continuous deployment. Key features:
- Corepack Integration: Automatically uses Yarn 4.12.0
- Dependency Caching: Caches Yarn dependencies for faster builds (~140 MB)
- Auto-deployment: Deploys to GitHub Pages on push to
main
This project uses Yarn Berry (v4.12.0). Key differences from Yarn 1.x:
- ✅ Faster installs with better caching
- ✅ More efficient dependency resolution
- ✅ Better security with zero-installs support
⚠️ Some CLI flags differ from Yarn 1.x (e.g., useYARN_IGNORE_NODE=1instead of--ignore-engines)
For production applications, consider enabling type-aware lint rules:
export default {
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
};Then update to use plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked.
This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license.
Contributions are welcome! Please ensure your code follows the project's ESLint and Prettier configurations.