Skip to content

Commit b457934

Browse files
committed
feat: Add contributing guide and update README for contribution instructions
1 parent 387dd56 commit b457934

2 files changed

Lines changed: 118 additions & 12 deletions

File tree

CONTRIBUTE.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Contributing Guide
2+
3+
感谢你对 **Involution Hell Docs** 的兴趣!
4+
这是一个基于 **Next.js + Contentlayer** 的开源文档站点,内容来自 `docs/` 文件夹。
5+
欢迎提交 Pull Request 或 Issue。
6+
7+
---
8+
9+
## 🚀 开发环境
10+
11+
### 1. 克隆仓库
12+
13+
```bash
14+
git clone https://github.com/involutionhell/involutionhell.github.io.git
15+
cd involutionhell.github.io
16+
```
17+
18+
### 2. 安装依赖
19+
20+
我们使用 **pnpm** 作为包管理工具:
21+
22+
```bash
23+
pnpm install
24+
```
25+
26+
如果你还没有安装 pnpm:
27+
28+
```bash
29+
npm install -g pnpm
30+
```
31+
32+
### 3. 本地开发
33+
34+
运行开发服务器:
35+
36+
```bash
37+
pnpm dev
38+
```
39+
40+
打开浏览器访问 [http://localhost:3000](http://localhost:3000)
41+
42+
修改 `docs/` 下的 `.md``.mdx` 文件,会自动热更新。
43+
44+
---
45+
46+
## 📚 文档规范
47+
48+
所有文档放在 `docs/` 目录。
49+
每个文档都需要一个 Frontmatter,例如:
50+
51+
```md
52+
---
53+
title: Hello World
54+
description: 简短描述
55+
date: "2025-09-11"
56+
tags:
57+
- intro
58+
---
59+
60+
# Hello World
61+
62+
这是正文内容。
63+
```
64+
65+
* **title**: 必填,文档标题
66+
* **description**: 可选,简短说明
67+
* **date**: 可选,发布日期
68+
* **tags**: 可选,标签列表
69+
70+
---
71+
72+
## 🏗️ 构建与导出
73+
74+
### 构建(生成 .next)
75+
76+
```bash
77+
pnpm build
78+
```
79+
80+
### 静态导出(生成 /out 目录)
81+
82+
```bash
83+
pnpm export
84+
```
85+
86+
导出后的 `/out` 就是静态站点,可直接部署到 GitHub Pages。
87+
88+
---
89+
90+
## 🚢 部署
91+
92+
本仓库配置了 **GitHub Actions**,push 到 `main` 分支会自动构建并部署到:
93+
94+
👉 [https://involutionhell.github.io/](https://involutionhell.github.io/)
95+
96+
无需手动操作。
97+
98+
---
99+
100+
## 🤝 如何贡献
101+
102+
1. Fork 本仓库
103+
2. 在新分支进行修改
104+
3. 提交 PR
105+
106+
我们欢迎以下贡献:
107+
108+
* 修正文档内容
109+
* 添加新的教程或指南
110+
* 改进页面样式或交互

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,13 @@ You can start editing the page by modifying `app/page.tsx`. The page auto-update
2020

2121
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
2222

23-
## Learn More
23+
## Contributing
2424

25-
To learn more about Next.js, take a look at the following resources:
25+
- **请先阅读 `CONTRIBUTE.md`**:包含本项目的本地开发环境、分支策略、代码规范、提交信息格式、PR 流程与评审标准等。
26+
- **文档位置**`packages/involutionhell.github.io/CONTRIBUTE.md`(或直接点击仓库根目录下的同名文件)。
27+
- **快速开始贡献**
28+
- Fork 并创建特性分支(示例:`feat/your-feature`)。
29+
- 遵循 `CONTRIBUTE.md` 的规范完成开发与自测。
30+
- 提交 PR,并在描述中关联 Issue、填写变更说明与测试要点。
2631

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29-
30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31-
32-
## Deploy on Vercel
33-
34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35-
36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
32+
更多细节、注意事项与最佳实践,请务必查阅 [`CONTRIBUTE.md`](./CONTRIBUTE.md)

0 commit comments

Comments
 (0)