Skip to content

Commit

Permalink
Merge pull request DaoCloud#2937 from windsonsea/gity
Browse files Browse the repository at this point in the history
remove vpn tips from git workflow
  • Loading branch information
windsonsea authored Nov 29, 2023
2 parents e1ccc35 + 1c31b02 commit 489ccda
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
39 changes: 21 additions & 18 deletions docs/zh/docs/native/knowledge/git/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,13 @@

本页简要说明一些通用的 Git 文档编写、评审、翻译流程和技巧。

## 前提条件
## 准备

- [科学上网 🪜](./proxy.md):这是走出去的第一步

在本地编辑时,需要预先安装几个工具(云端编辑无需安装):

- [Git](https://git-scm.com/downloads),必需,装完才能支持各种 Git 命令
- [VScode](https://code.visualstudio.com/),推荐,常用的 Markdown 编辑器
- [Typora](https://macwk.com/soft/typora),可选,可以粘贴网页的图表文字,转换成 markdown 格式

参考资料:

- [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/)
这是 DCE 5.0 文档站的编译器帮助手册
- [Issues](https://github.com/DaoCloud/DaoCloud-docs/issues):目前文档站存在的一些问题
- [Discussions](https://github.com/DaoCloud/DaoCloud-docs/discussions)
类似于 Issue 频道,也列出了一些文档站的问题
良好的网络环境,嗯,这是必须的 O(∩_∩)O

## Git 云端编写 (For Author)

如今云无处不在,只要能连通互联网,就可以在线编辑,无需在本地构建环境和安装工具
如今云无处不在,只要能连通互联网,就可以在线编辑,无需构建环境和安装工具

### 网页直接修改

Expand Down Expand Up @@ -74,6 +60,12 @@

## Git 本地编写 (For Author)

这是 Git 老兵们常用的编辑方式。在本地编辑之前,需要预先安装几个工具:

- [Git](https://git-scm.com/downloads),必需,装完才能支持各种 Git 命令
- [VScode](https://code.visualstudio.com/),推荐,常用的 Markdown 编辑器
- [Typora](https://macwk.com/soft/typora),可选,可以粘贴网页的图表文字,转换成 markdown 格式

1. Fork 后克隆 GitHub 仓库。

```bash
Expand Down Expand Up @@ -190,10 +182,21 @@ make lint-yaml

过长的语句不方便以 Git 方式更新,因为更新长句时很难从 PR 中一眼找出变化,所以需要将长句折行。

通常如果某个文件有长句 wraps > 80,可以先运行以下命令:
推荐使用 [prettier](https://prettier.io/)。如果有很长的句子,可以在 col 100 - 120
左右的(中英、标点、数字之间)折行。也可以尝试运行以下命令:

```shell
npx prettier -w filename
```

然后手动修改对应的文件,实现折行。

## 参考资料

- [Markdown 语法](https://www.markdownguide.org/cheat-sheet/)
- [Git 命令查询表](https://education.github.com/git-cheat-sheet-education.pdf)
- [Issues](https://github.com/DaoCloud/DaoCloud-docs/issues):目前文档站存在的一些问题
- [Discussions](https://github.com/DaoCloud/DaoCloud-docs/discussions):
类似于 Issue 频道,也列出了一些文档站的问题
- [Material for MkDocs 帮助](https://squidfunk.github.io/mkdocs-material/reference/):
这是 DCE 5.0 文档站的编译器帮助手册
3 changes: 1 addition & 2 deletions docs/zh/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1201,9 +1201,8 @@ nav:
- 电子书: native/knowledge/ebooks.md
- Git:
- Git 文档流程: native/knowledge/git/index.md
- Git 代理设置: native/knowledge/git/proxy.md
- GitHub 混迹技巧: native/knowledge/git/github.md
- 开启两步安全验证: native/knowledge/git/2auth.md
- Git 常见问题: native/knowledge/git/rebase.md
- UI 翻译预览: native/knowledge/git/ui-preview.md
- GitHub 混迹技巧: native/knowledge/git/github.md
- 其他: native/knowledge/other.md

0 comments on commit 489ccda

Please sign in to comment.