Skip to content

Commit 4f11463

Browse files
committed
docs(README): enhance project documentation with detailed setup and configuration instructions
- Updated project description for clarity and added tech stack overview - Included prerequisites and quick start guide for easier onboarding - Added configuration options and deployment instructions for static hosting - Improved overall structure and readability of the README
1 parent b2c6da4 commit 4f11463

1 file changed

Lines changed: 89 additions & 2 deletions

File tree

README.md

Lines changed: 89 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,94 @@
1-
### Tome & Jerry 😄
1+
# Tome & Jerry 😄
22

3-
> Powered by [Gossip](https://github.com/qianxi0410/gossip).
3+
> A personal site powered by [Gossip](https://github.com/qianxi0410/gossip), using GitHub Issues as the content source. Supports static export and GitHub Pages deployment.
44
55
<div align="center">
66
<img src="https://github.com/z0ffy/z0ffy.github.io/blob/master/public/Tom&Jerry.gif?raw=true" width=100% alt="Tome&Jerry" />
77
</div>
8+
9+
---
10+
11+
## Tech Stack
12+
13+
- **Framework**: Next.js 16 (React 19) + TypeScript
14+
- **Styling**: Tailwind CSS 4
15+
- **Data**: GitHub API (Octokit); Issues are treated as posts
16+
- **Features**: Light/dark theme, Markdown + GFM, code highlighting, Utterances comments, RSS, Sitemap
17+
18+
## Prerequisites
19+
20+
- Node.js 18+
21+
- pnpm (recommended), npm, or yarn
22+
23+
## Quick Start
24+
25+
### 1. Install dependencies
26+
27+
```bash
28+
pnpm install
29+
```
30+
31+
### 2. Environment variables
32+
33+
Create `.env.local` in the project root, for example:
34+
35+
```env
36+
# GitHub (required)
37+
OWNER=your-github-username
38+
REPO=repository-name (e.g. z0ffy.github.io)
39+
ACCESS_TOKEN=Personal Access Token with repo scope
40+
41+
# Optional
42+
GOOGLE_ANALYTICS_ID=G-xxxx # Leave empty to disable GA
43+
DEPLOY_TARGET=gh-pages # Set when deploying to GitHub Pages (for basePath, etc.)
44+
```
45+
46+
### 3. Development
47+
48+
```bash
49+
pnpm dev
50+
```
51+
52+
Open [http://localhost:3000](http://localhost:3000).
53+
54+
### 4. Build and preview
55+
56+
```bash
57+
pnpm build # Static export to out/
58+
pnpm start # Preview production build locally (if needed)
59+
```
60+
61+
## Configuration
62+
63+
Site behaviour can be tuned in `next.config.js` under `env`:
64+
65+
| Variable | Description | Example |
66+
|----------|-------------|---------|
67+
| `comment` | Enable Utterances comments | `'true'` / `'false'` |
68+
| `theme` | Theme mode | `'light'` / `'dark'` / `'both'` |
69+
| `rss` | Generate RSS on build | `'true'` / `'false'` |
70+
| `back2top` | Show back-to-top button | `'true'` / `'false'` |
71+
| `mail` | Email to display | string |
72+
| `twitter` | Twitter handle to display | string |
73+
| `bio` | Homepage bio (overrides GitHub bio) | string |
74+
75+
**Posts**: Issues in the repo with the `LABELS` label (default `published`) are shown as posts; the Issue title is the post slug.
76+
77+
## Scripts
78+
79+
| Command | Description |
80+
|---------|-------------|
81+
| `pnpm dev` | Start dev server |
82+
| `pnpm build` | Static build (postbuild runs sitemap generation) |
83+
| `pnpm start` | Run production build locally |
84+
| `pnpm lint` | Run ESLint |
85+
| `pnpm fix` | ESLint with auto-fix |
86+
87+
## Deployment
88+
89+
- The project uses `output: "export"` for a static site. Deploy the `out/` directory to any static host.
90+
- For **GitHub Pages**, set `DEPLOY_TARGET=gh-pages`. If the repo name is not `{OWNER}.github.io`, `basePath` is set automatically.
91+
92+
## License
93+
94+
[MIT](LICENSE) © zoffy

0 commit comments

Comments
 (0)