Skip to content

Commit 387079c

Browse files
committed
补充相关文档
1 parent 0ac5334 commit 387079c

File tree

12 files changed

+13146
-11518
lines changed

12 files changed

+13146
-11518
lines changed

.github/workflows/gh-pages.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,25 @@ jobs:
2323
with:
2424
# 如果配置 themeConfig.lastUpdated 为 false,则不需要添加该参数以加快检出速度
2525
fetch-depth: 0
26+
2627
- name: Setup Node
2728
uses: actions/setup-node@v4
2829
with:
29-
node-version: "20"
30+
node-version: 20
3031
cache: ${{ steps.detect-package-manager.outputs.manager }}
31-
- name: Install dependencies
32-
run: yarn
33-
- name: Build with dumi
32+
33+
- name: Install pnpm (安装 pnpm)
34+
uses: pnpm/action-setup@v2
35+
with:
36+
version: 8.15.6
37+
38+
- name: Install dependencies (安装依赖)
39+
run: pnpm install
40+
41+
- name: Build (构建)
3442
# 文档编译命令,如果是 react 模板需要修改为 npm run docs:build
35-
run: yarn build
43+
run: pnpm build
44+
3645
- name: Upload artifact
3746
uses: actions/upload-pages-artifact@v3
3847
with:

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@ A static site base on [dumi](https://d.umijs.org).
66

77
```bash
88
# install dependencies
9-
$ yarn install
9+
$ pnpm install
1010

1111
# start dev server
12-
$ yarn start
12+
$ pnpm dev
1313

1414
# build docs
1515
$ yarn run build
1616

17-
# Locally preview the production build
18-
$ yarn run preview
1917
```
2018

2119
## LICENSE

docs/Git/index.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Git
2+
3+
4+
## 常用命令
5+
6+
### 配置用户名 & 邮箱
7+
```bash
8+
git config --global user.name "你的用户名"
9+
10+
git config --global user.email "你的邮箱地址"
11+
```
12+
13+
### git stash
14+
15+
git stash 命令用于临时保存当前工作区的改动,这样你就可以在不提交改动的情况下切换到其他分支。
16+
17+
以下是一些常用的 git stash 命令:
18+
19+
* git stash save "message":将当前的改动保存到一个新的 stash 中,你可以提供一个可选的消息来描述这个 stash。
20+
* git stash list:列出所有的 stash。
21+
* git stash apply:应用最近的 stash 到当前工作区,但不会从 stash 列表中删除这个 stash。
22+
* git stash pop:应用最近的 stash 到当前工作区,并从 stash 列表中删除这个 stash。
23+
* git stash drop stash@{n}:删除指定的 stash。
24+
* git stash clear:删除所有的 stash。
25+
26+
27+
### git rebase
28+
29+
git rebase 命令用于将一系列提交应用到另一个基点上,它是 Git 中用于整理提交以使其更清晰的主要工具之一。
30+
31+
以下是一些常用的 git rebase 命令:
32+
33+
* git rebase <base>:将当前分支的提交应用到 <base> 分支上。这将使得当前分支的提交看起来像是在 <base> 分支的最新提交之后进行的。
34+
* git rebase -i <base> 或 git rebase --interactive <base>:以交互方式进行 rebase。这将打开一个 UI,让你可以选择要如何处理每个提交(包括丢弃、修改提交信息、合并等)。
35+
* git rebase --continue:在解决完 rebase 过程中的冲突后,使用此命令继续 rebase 进程。
36+
* git rebase --abort:如果你想放弃当前的 rebase 进程,可以使用此命令。
37+

docs/Homebrew/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Homebrew
2+
3+
4+
## 安装
5+
```bash
6+
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
7+
8+
```

docs/NodeJS/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# 安装NodeJS
1+
# NodeJS
22

33

4-
## 使用nvm管理工具安装
4+
## 安装
55

66
```bash
77
# 安装nvm

docs/guide.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/iTem2/image-1.png

235 KB
Loading

docs/iTem2/image.png

112 KB
Loading

docs/iTem2/index.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# iTem2
2+
3+
4+
## 安装
5+
```bash
6+
# 官网下载
7+
https://iterm2.com/
8+
```
9+
10+
## 美化改造
11+
12+
### 配置
13+
14+
将iTem2设置为默认终端:(菜单栏)iTerm2 -> Make iTerm2 Default Term
15+
16+
![alt text](./image.png)
17+
18+
然后打开偏好设置preference,选中Keys,勾选Hotkey下的Show/hide iTerm2 with a system-wide hotkey,将热键设置为command+. ,这样你就可以通过command+. 全局热键来打开或关闭iTerm2窗口,非常方便。
19+
20+
![alt text](./image-1.png)
21+
22+
23+
24+
### 安装oh-my-zsh
25+
26+
github连接:https://github.com/robbyrussell/oh-my-zsh
27+
28+
使用 crul 安装:
29+
30+
```bash
31+
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
32+
```
33+
34+
或使用wget:
35+
36+
37+
```bash
38+
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
39+
```
40+
41+
42+
### 主题
43+
44+
安装成功后,用vim打开隐藏文件 .zshrc ,修改主题为 agnoster:
45+
46+
```bash
47+
ZSH_THEME="agnoster"
48+
```
49+
50+
应用这个主题需要特殊的字体支持,否则会出现乱码情况,这时我们来配置字体:
51+
52+
1.使用 [Meslo](https://github.com/powerline/fonts/blob/master/Meslo%20Slashed/Meslo%20LG%20M%20Regular%20for%20Powerline.ttf) 字体,点开连接点击 view raw 下载字体。
53+
54+
2.安装字体到系统字体册。
55+
56+
3.应用字体到iTerm2下,我自己喜欢将字号设置为14px,看着舒服(iTerm -> Preferences -> Profiles -> Text -> Change Font)。
57+
58+
4.重新打开iTerm2窗口,这时便可以看到效果了。
59+
60+
61+
### 自动提示命令
62+
63+
当我们输入命令时,终端会自动提示你接下来可能要输入的命令,这时按 → 便可输出这些命令,非常方便。
64+
65+
设置如下:
66+
67+
1.克隆仓库到本地 ~/.oh-my-zsh/custom/plugins 路径下
68+
69+
```bash
70+
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
71+
```
72+
73+
2.用 vim 打开 .zshrc 文件,找到插件设置命令,默认是 plugins=(git) ,我们把它修改为
74+
75+
```bash
76+
plugins=(zsh-autosuggestions git)
77+
```
78+
79+
80+
3.重新打开终端窗口。
81+
82+
PS:当你重新打开终端的时候可能看不到变化,可能你的字体颜色太淡了,我们把其改亮一些:
83+
84+
移动到 ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions 路径下
85+
86+
```bash
87+
cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
88+
```
89+
90+
用 vim 打开 zsh-autosuggestions.zsh 文件,修改 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10'
91+
92+
93+
### 语法高亮
94+
95+
1.使用homebrew安装 zsh-syntax-highlighting 插件。
96+
97+
```bash
98+
brew install zsh-syntax-highlighting
99+
```
100+
101+
2.配置.zshrc文件,插入一行。
102+
103+
```bash
104+
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
105+
```
106+
107+
3.输入命令。
108+
109+
```bash
110+
source ~/.zshrc
111+
```

docs/index.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
---
2-
title: A static site based on dumi
2+
title: 一些文档
33
hero:
4-
title: Site
5-
description: A static site based on dumi
4+
title: Docs
5+
description: 一些文档
66
actions:
77
- text: Hello
88
link: /
99
- text: World
1010
link: /
11-
features:
12-
- title: Hello
13-
emoji: 💎
14-
description: Put hello description here
15-
- title: World
16-
emoji: 🌈
17-
description: Put world description here
18-
- title: '!'
19-
emoji: 🚀
20-
description: Put ! description here
2111
---
2212

2313

0 commit comments

Comments
 (0)