Skip to content

Commit 1485a34

Browse files
committed
chore: cleanup dependencies and add contributor documentation
- Add comprehensive "For Contributors" guide to README.md - Remove unused dependencies: next-intl, zod, and @t3-oss/env-nextjs - Delete obsolete environment configuration and helper files - Add bundle analysis script to package.json
1 parent 5c55348 commit 1485a34

File tree

6 files changed

+194
-2855
lines changed

6 files changed

+194
-2855
lines changed

README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,88 @@
33
# ConnectBot home page
44

55
Web page for [ConnectBot](https://connectbot.org/), the first open source SSH client on Android.
6+
7+
## For Contributors
8+
9+
### Prerequisites
10+
11+
- [Node.js](https://nodejs.org/) 20 or later
12+
- [pnpm](https://pnpm.io/) 10 or later
13+
14+
### Getting Started
15+
16+
1. Clone the repository:
17+
```bash
18+
git clone https://github.com/connectbot/connectbot.github.io.git
19+
cd connectbot.github.io
20+
```
21+
22+
2. Install dependencies:
23+
```bash
24+
pnpm install
25+
```
26+
27+
3. Start the development server:
28+
```bash
29+
pnpm dev
30+
```
31+
32+
The site will be available at http://localhost:3000
33+
34+
### Development Workflow
35+
36+
The site is built with [Next.js](https://nextjs.org/) and [Nextra](https://nextra.site/), a documentation framework. Content is written in MDX (Markdown + JSX) in the `src/content/` directory.
37+
38+
**Project structure:**
39+
- `src/content/` - MDX content files
40+
- `src/content/_meta.ts` - Page configuration (titles, navigation)
41+
- `src/app/` - Next.js App Router structure
42+
- `src/components/` - React components
43+
- `public/` - Static assets
44+
45+
**Git hooks:**
46+
This project uses [Lefthook](https://github.com/evilmartians/lefthook) for Git hooks:
47+
- Pre-commit: Runs ESLint auto-fix and TypeScript type checking
48+
- Commit-msg: Validates conventional commit format
49+
50+
### Building and Testing
51+
52+
**Build the site:**
53+
```bash
54+
pnpm build
55+
```
56+
57+
This generates a static export in the `./out` directory.
58+
59+
**Lint your code:**
60+
```bash
61+
pnpm lint # Check for errors
62+
pnpm lint:fix # Auto-fix errors
63+
```
64+
65+
**Type check:**
66+
```bash
67+
pnpm run check:types
68+
```
69+
70+
**Check for unused dependencies:**
71+
```bash
72+
pnpm run check:deps
73+
```
74+
75+
**Analyze bundle size:**
76+
```bash
77+
pnpm run analyze
78+
```
79+
80+
### Deployment
81+
82+
The site is automatically deployed to GitHub Pages when changes are pushed to the `develop` branch. The CI workflow:
83+
1. Runs linting and type checking
84+
2. Builds the static site
85+
3. Deploys to GitHub Pages
86+
87+
You can preview the production build locally by serving the `./out` directory:
88+
```bash
89+
npx serve ./out
90+
```

next.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { NextConfig } from 'next';
22
import bundleAnalyzer from '@next/bundle-analyzer';
33
import nextra from 'nextra';
4-
import './src/libs/Env';
54

65
// Define the base Next.js configuration
76
const baseConfig: NextConfig = {

package.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"scripts": {
3+
"analyze": "next experimental-analyze",
34
"check:types": "tsc --noEmit --pretty",
45
"check:deps": "knip",
56
"dev": "next",
@@ -12,28 +13,22 @@
1213
"dependencies": {
1314
"@commitlint/cli": "^20.3.0",
1415
"@commitlint/config-conventional": "^20.3.0",
15-
"@commitlint/prompt-cli": "^20.3.0",
16-
"@t3-oss/env-nextjs": "^0.13.10",
1716
"next": "^16.1.1",
18-
"next-intl": "^4.7.0",
1917
"next-themes": "^0.4.6",
2018
"nextra": "^4.6.1",
2119
"nextra-theme-docs": "^4.6.1",
2220
"qrcode.react": "^4.2.0",
2321
"react": "^19.2.3",
24-
"react-dom": "^19.2.3",
25-
"zod": "^4.3.5"
22+
"react-dom": "^19.2.3"
2623
},
2724
"devDependencies": {
2825
"@antfu/eslint-config": "^6.7.3",
2926
"@commitlint/types": "^20.2.0",
3027
"@eslint-react/eslint-plugin": "^2.5.1",
3128
"@next/bundle-analyzer": "^16.1.1",
3229
"@next/eslint-plugin-next": "^16.1.1",
33-
"@tailwindcss/postcss": "^4.1.18",
3430
"@types/node": "^25.0.3",
3531
"@types/react": "^19.2.7",
36-
"@vitejs/plugin-react": "^5.1.2",
3732
"babel-plugin-react-compiler": "^1.0.0",
3833
"eslint": "^9.39.2",
3934
"eslint-plugin-format": "^1.2.0",
@@ -45,10 +40,7 @@
4540
"knip": "^5.80.0",
4641
"lefthook": "^2.0.13",
4742
"pagefind": "^1.4.0",
48-
"semantic-release": "^25.0.2",
4943
"tailwindcss": "^4.1.18",
50-
"typescript": "^5.9.3",
51-
"vite": "^7.3.1",
52-
"vite-tsconfig-paths": "^6.0.3"
44+
"typescript": "^5.9.3"
5345
}
5446
}

0 commit comments

Comments
 (0)