File tree Expand file tree Collapse file tree 3 files changed +28
-8
lines changed Expand file tree Collapse file tree 3 files changed +28
-8
lines changed Original file line number Diff line number Diff line change
1
+
2
+ serve :
3
+ zine
4
+
5
+ lint :
6
+ npx @lint-md/cli ** /*
7
+
8
+ format :
9
+ npx @lint-md/cli --fix ** /*
10
+
11
+
12
+ EXCLUDE = --exclude "*webp" --exclude "*svg" --exclude "*gif"
13
+ IMG_PATH = ./static/images
14
+ webp :
15
+ fd -t f $(EXCLUDE ) --full-path $(IMG_PATH ) --exec convert {} {.}.webp \;
16
+ fd -t f $(EXCLUDE ) --full-path $(IMG_PATH ) --exec rm {} \;
Original file line number Diff line number Diff line change 51
51
52
52
# [其他学习资料]($section.id('other-learning-resources'))
53
53
54
- 由于 Zig 目前还处于快速迭代,因此最权威的资料无疑是官方的 [Zig Language Reference](https://ziglang.org/documentation/master/),遇到语言的细节问题,基本都可以在这里找到答案。 其次是社区的一些高质量教程,例如:
54
+ 由于 Zig 目前还处于快速迭代,因此最权威的资料无疑是官方的 [Zig Language Reference](https://ziglang.org/documentation/master/),遇到语言的细节问题,基本都可以在这里找到答案。其次是社区的一些高质量教程,例如:
55
55
56
56
- **[Zig 日报](https://github.com/zigcc/forum/issues):**
57
57
- **[Zig 语言圣经](https://course.ziglang.cc):** 一份内容全面、深入浅出介绍 Zig 的教程
Original file line number Diff line number Diff line change @@ -14,19 +14,23 @@ Zig 官网的[下载页面](https://ziglang.org/download/)中包含常见平台
14
14
15
15
现在,你可以运行 `zig zen` 和 `zig version` 来测试是否安装正确。
16
16
17
- > 译者注:建议读者使用版本管理工具来安装 Zig,具体可参考:[《Zig 多版本管理》]({{< ref "/post/2023-10-14-zig-version-manager.org" >}})。
17
+ > 译者注:建议读者使用版本管理工具来安装 Zig。以下是使用 [asdf](https://asdf-vm.com/) 的安装方法:
18
18
19
19
```bash
20
- git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
21
- cat <<'EOF' >> $HOME/.bashrc
22
- source "$HOME/.asdf/asdf.sh"
23
- source "$HOME/.asdf/completions/asdf.bash"
24
- EOF
20
+ brew install asdf
25
21
26
- asdf plugin- add zig https://github.com/zigcc/asdf-zig.git
22
+ asdf plugin add zig https://github.com/zigcc/asdf-zig.git
27
23
28
24
# [安装最新版]($section.id('install-latest-version'))
29
25
asdf install zig latest
26
+
27
+ # 设置为全局版本
28
+ # asdf 0.16 之前
30
29
asdf global zig latest
30
+
31
+ # asdf 0.16 之后
32
+ asdf set --home zig latest
33
+
34
+ # 验证安装
31
35
zig version
32
36
```
You can’t perform that action at this time.
0 commit comments