|
1 | 1 | ---
|
2 |
| -.title = "About", |
3 |
| -.date = @date("1990-01-01T00:00:00"), |
| 2 | +.date = "2024-08-04T08:51:07+0800", |
| 3 | +.title = "学习 Zig", |
4 | 4 | .author = "ZigCC",
|
5 | 5 | .layout = "index.shtml",
|
6 | 6 | .draft = false,
|
7 |
| ---- |
| 7 | +--- |
8 | 8 |
|
9 |
| -# [About Zine]($section.id('About Zine')) |
10 |
| -Zine is an MIT-licensed project created by [Loris Cro](https://kristoff.it) and |
11 |
| -other contributors listed on the [official repository](https://github.com/kristoff-it/zine/contributors). |
| 9 | +# 资料 |
12 | 10 |
|
13 |
| -Zine is inspired by [Hugo](https://gohugo.io) but features an entirely custom set |
14 |
| -of authoring languages: |
| 11 | +由于 Zig 目前还处于快速迭代,因此最权威的资料无疑是官方的 [Zig Language |
| 12 | +Reference](https://ziglang.org/documentation/master/),遇到语言的细节问题,基本都可以在这里找到答案。 |
| 13 | +其次是社区的一些高质量教程,例如: |
15 | 14 |
|
16 |
| -- [Scripty](https://zine-ssg.io/docs/scripty/) is the small expression |
17 |
| - language that both SuperHTML and SuperMD share to express templating logic. |
| 15 | +[Zig Guide](https://zig.guide/) |
| 16 | +英文资料, [Sobeston](https://github.com/Sobeston) 用户编写 |
18 | 17 |
|
19 |
| -- [SuperHTML](https://zine-ssg.io/docs/superhtml/) is the HTML templating |
20 |
| - language used by Zine. Unlike most `{{curly braced}}` templating languages, |
21 |
| - SuperHTML uses valid HTML syntax to express the templating logic, adding only |
22 |
| - minor extensions to normal HTML. |
23 |
| - Thanks to this approach, it offers instant |
24 |
| - syntax checking and autoformatting via [a CLI tool](https://github.com/kristoff-it/superhtml) as well as Language Server support ([VScode Extension](https://marketplace.visualstudio.com/items?itemName=LorisCro.super)). |
25 |
| - |
26 |
| - ># [NOTE]($block) |
27 |
| - >The correct file extension for SuperHTML templates is `.shtml`. |
| 18 | +[Zig in 30 minutes](https://gist.github.com/ityonemo/769532c2017ed9143f3571e5ac104e50) |
28 | 19 |
|
29 |
| -- [SuperMD](https://zine-ssg.io/docs/supermd/) is a superset of Markdown |
30 |
| - that, instead of relying on inline HTML, offers new constructs for expressing |
31 |
| - content embeds without pulling into your content needless layouting concerns. |
32 |
| - A CLI tool and language server for SuperMD is in the works. |
33 |
| - |
34 |
| - ># [NOTE]($block) |
35 |
| - >The correct file extension for SuperMD pages is `.smd`. |
| 20 | +[学习 Zig](https://ziglang.cc/learning-zig/) |
| 21 | +该系列教程最初由 Karl Seguin |
| 22 | +编写,该教程行文流畅,讲述的脉络由浅入深,深入浅出,是入门 Zig |
| 23 | +非常不错的选择 |
36 | 24 |
|
37 |
| -# [Zine is alpha software]($section.id('zine-is-alpha-software')) |
| 25 | +[Zig 语言圣经](https://course.ziglang.cc) |
| 26 | +一份内容全面、深入浅出介绍 Zig 的教程 |
38 | 27 |
|
39 |
| -Zine is not yet complete. The main functionality is present and you will be able |
40 |
| -to build even moderately complex static websites without issue. |
| 28 | +[ziglings/exercises](https://codeberg.org/ziglings/exercises/) |
| 29 | +Learn the Zig programming language by fixing tiny broken programs. |
41 | 30 |
|
42 |
| -That said using Zine today does imply participating in the development process |
43 |
| -to some degree, which usually means inquiring about the development status of |
44 |
| -a feature you need, or reporting a bug. |
| 31 | +[Zig Cookbook](https://cookbook.ziglang.cc/) |
| 32 | +A collection of simple Zig programs that demonstrate good practices to |
| 33 | +accomplish common programming tasks |
45 | 34 |
|
| 35 | +[Awesome Zig](https://github.com/zigcc/awesome-zig) |
| 36 | +A collection of some awesome public Zig programming language projects. |
46 | 37 |
|
47 |
| -Here are some quicklinks related to Zine: |
| 38 | +# 版本管理 |
48 | 39 |
|
49 |
| -- Official Website: https://zine-ssg.io/ |
50 |
| -- Source Code: https://github.com/kristoff-it/zine/ |
51 |
| -- Discord: https://discord.com/invite/B73sGxF |
52 |
| - |
| 40 | +推荐使用版本管理工具 |
| 41 | +[asdf](file:///post/2023/10/14/zig-version-manager/) 来安装 |
| 42 | +Zig,具体步骤: |
53 | 43 |
|
| 44 | +``` bash |
| 45 | +git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 |
| 46 | +cat <<'EOF' >> $HOME/.bashrc |
| 47 | +source "$HOME/.asdf/asdf.sh" |
| 48 | +source "$HOME/.asdf/completions/asdf.bash" |
| 49 | +EOF |
54 | 50 |
|
| 51 | +asdf plugin-add zig https://github.com/zigcc/asdf-zig.git |
55 | 52 |
|
| 53 | +# 安装最新版 |
| 54 | +asdf install zig latest |
| 55 | +asdf global zig latest |
| 56 | +zig version |
| 57 | +``` |
56 | 58 |
|
0 commit comments