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 5151
5252# [其他学习资料]($section.id('other-learning-resources'))
5353
54- 由于 Zig 目前还处于快速迭代,因此最权威的资料无疑是官方的 [Zig Language Reference](https://ziglang.org/documentation/master/),遇到语言的细节问题,基本都可以在这里找到答案。 其次是社区的一些高质量教程,例如:
54+ 由于 Zig 目前还处于快速迭代,因此最权威的资料无疑是官方的 [Zig Language Reference](https://ziglang.org/documentation/master/),遇到语言的细节问题,基本都可以在这里找到答案。其次是社区的一些高质量教程,例如:
5555
5656- **[Zig 日报](https://github.com/zigcc/forum/issues):**
5757- **[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/)中包含常见平台
1414
1515现在,你可以运行 `zig zen` 和 `zig version` 来测试是否安装正确。
1616
17- > 译者注:建议读者使用版本管理工具来安装 Zig,具体可参考:[《Zig 多版本管理》]({{< ref "/post/2023-10-14-zig-version-manager.org" >}})。
17+ > 译者注:建议读者使用版本管理工具来安装 Zig。以下是使用 [asdf](https://asdf-vm.com/) 的安装方法:
1818
1919```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
2521
26- asdf plugin- add zig https://github.com/zigcc/asdf-zig.git
22+ asdf plugin add zig https://github.com/zigcc/asdf-zig.git
2723
2824# [安装最新版]($section.id('install-latest-version'))
2925asdf install zig latest
26+
27+ # 设置为全局版本
28+ # asdf 0.16 之前
3029asdf global zig latest
30+
31+ # asdf 0.16 之后
32+ asdf set --home zig latest
33+
34+ # 验证安装
3135zig version
3236```
You can’t perform that action at this time.
0 commit comments