mirror of
https://github.com/halo-dev/docs.git
synced 2026-01-14 07:02:53 +08:00
重构文档版本结构。 - 移除 1.5/1.4 相关所有 patch 版本的文档,使用 1.5/1.4 版本号代替。 - 创建 1.6 的文档版本。 - 后续针对 1.5 或者 1.6 的更新,可以直接对具体版本进行更改。 本打算使用 [@docusaurus/plugin-client-redirects](https://docusaurus.io/zh-CN/docs/api/plugins/@docusaurus/plugin-client-redirects) 做已删除的 patch 版本的重定向,旦可能不是很好满足匹配重定向的需求。~~所以在此 PR 合并之前我将通过 Nginx 对具体版本进行重定向转发~~。 比如:`/1.4.17/{path}` 重定向到 `/1.4/{path}`,`/1.5.4/{path}` `/1.5.3/{path}` 都从定向到 `/1.5/{path}` /kind documentation /cc @halo-dev/sig-docs > PS: 此 PR 未对新发布的 [1.6.0](https://github.com/halo-dev/halo/releases/tag/v1.6.0) [1.5.5](https://github.com/halo-dev/halo/releases/tag/v1.5.5) [2.0.0-alpha.2](https://github.com/halo-dev/halo/releases/tag/v2.0.0-alpha.2) 做修改,将在后续 PR 更改。 ```release-note None ```
59 lines
1.2 KiB
Markdown
59 lines
1.2 KiB
Markdown
---
|
||
title: 代码贡献
|
||
description: 代码贡献指南
|
||
---
|
||
|
||
> 欢迎你参与 Halo 的开发,下面是参与代码贡献的指南,以供参考。
|
||
|
||
### 代码贡献步骤
|
||
|
||
#### 0. 提交 issue
|
||
|
||
任何新功能或者功能改进建议都先提交 issue 讨论一下再进行开发,bug 修复可以直接提交 pull request。
|
||
|
||
#### 1. Fork 此仓库
|
||
|
||
点击右上角的 `fork` 按钮即可。
|
||
|
||
#### 2. Clone 仓库到本地
|
||
|
||
```bash
|
||
git clone https://github.com/{YOUR_USERNAME}/halo
|
||
|
||
git submodule init
|
||
|
||
git submodule update
|
||
```
|
||
|
||
#### 3. 创建新的开发分支
|
||
|
||
```bash
|
||
git checkout -b {BRANCH_NAME}
|
||
```
|
||
|
||
#### 4. 提交代码
|
||
|
||
```bash
|
||
git push origin {BRANCH_NAME}
|
||
```
|
||
|
||
#### 5. 提交 pull request
|
||
|
||
回到自己的仓库页面,选择 `New pull request` 按钮,创建 `Pull request` 到原仓库的 `master` 分支。
|
||
|
||
然后等待我们 Review 即可,如有 `Change Request`,再本地修改之后再次提交即可。
|
||
|
||
#### 6. 更新主仓库代码到自己的仓库
|
||
|
||
```bash
|
||
git remote add upstream git@github.com:halo-dev/halo.git
|
||
|
||
git pull upstream master
|
||
|
||
git push
|
||
```
|
||
|
||
### 开发规范
|
||
|
||
请参考 [代码风格](/developer-guide/core/code-style),请确保所有代码格式化之后再提交。
|