Skip to content

fix: section IDs #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/contributing.smd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ zine
- [ZigCC 网站](https://ziglang.cc)
- [ZigCC 公众号](https://github.com/zigcc/.github/raw/main/zig_mp.png)

# [网站更新日志]($section.id('changelog'))
# [网站更新日志]($section.id('website-changelog'))

- **2025-06-30:** 切换到 [zine](https://zine-ssg.io/)
- **2024-08-18:** 切换主题 [docsy](https://github.com/google/docsy)
Expand Down
2 changes: 1 addition & 1 deletion content/learn/style-guide.smd
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fn read(stream: std.net.Stream) ![]const u8 {

我认为,这个规范并不能使代码可读性提高。在这个场景下,应该是开发者,而不是编译器,更有资格选择更有可读性的命名方案。

# [命名规范]($section.id('naming-convention'))
# [命名规范]($section.id('naming-conventions'))

除了遵守以上这些规则以外,开发者可以自由地选择他们喜欢的命名规范。但是,理解 Zig 自身的命名规范是有益的,因为大部分你需要打交道的代码,如 Zig 标准库,或者其他三方库,都采用了 Zig 的命名规范。

Expand Down
2 changes: 1 addition & 1 deletion content/monthly/202207.smd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
before starting with Zig? :
Zig](https://www.reddit.com/r/Zig/comments/w63x6r/is_it_necessary_to_know_c_or_another_systems/)

# [项目/工具]($section.id('项目/工具'))
# [项目/工具]($section.id('projects-and-tools'))

- [Release bun v0.1.5 ·
oven-sh/bun](https://github.com/oven-sh/bun/releases/tag/bun-v0.1.5)
Expand Down
2 changes: 1 addition & 1 deletion content/monthly/202208.smd
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

![](/images/blockly.webp)

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2022-08-01..2022-09-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些不用改吧?

之前的链接是当前月的 pull 修改


- [make self-hosted the default compiler by andrewrk · Pull Request
\#12368](https://github.com/ziglang/zig/pull/12368) Master
Expand Down
2 changes: 1 addition & 1 deletion content/monthly/202209.smd
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ Zig,笔者觉得大概率就是本次争论的观点,Rust
- [stm32f4.zig](https://github.com/moonxraccoon/stm32f4.zig) STM32F4(ARM
Cortex M4 的高性能 32 位微控制器) 固件抽象层

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?q=+is%3Aclosed+is%3Apr+closed%3A2022-09-01..2022-10-01+)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202210.smd
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
- [A minimal RocksDB example with
Zig](https://notes.eatonphil.com/zigrocks.html)

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2022-10-01..2022-11-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202211.smd
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ const Animal = union(enum){
- [Zig Support plugin for IntelliJ and CLion version 0.2.0
released](https://zig.news/marioariasc/zig-support-plugin-for-intellij-and-clion-version-020-released-3g06)

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2022-11-01..2022-12-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202212.smd
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

# [项目/工具]($section.id('项目/工具'))

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2022-12-01..2023-01-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202301.smd
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ Zig library for HyperLogLog estimation
[This Week In Zig](https://thisweekinzig.mataroa.blog/)
一个介绍 Zig 的周刊,主要是 master 分支上的改动

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-01-01..2023-02-01)
# [[Zig 语言更新]($section.id('zig-language-updates'))](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-01-01..2023-02-01)
2 changes: 1 addition & 1 deletion content/monthly/202302.smd
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ build,让构建不再那么痛苦。
- [Writing high-performance clients for
TigerBeetle](https://tigerbeetle.com/blog/2023-02-21-writing-high-performance-clients-for-tigerbeetle/)

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-02-01..2023-03-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202303.smd
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Tiny desktop utility to keep notes
[ringtailsoftware/zig-wasm-audio-framebuffer](https://github.com/ringtailsoftware/zig-wasm-audio-framebuffer)
Examples of integrating Zig and Wasm for audio and graphics on the web

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-03-01..2023-04-01)
# [[Zig 语言更新]($section.id('zig-language-updates'))](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-03-01..2023-04-01)

[zig build: run steps in parallel
\#14647](https://github.com/ziglang/zig/pull/14647)
Expand Down
2 changes: 1 addition & 1 deletion content/monthly/202304.smd
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ Zvisor is an open-source hypervisor written in the Zig programming
language, which provides a modern and efficient approach to systems
programming.

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-04-01..2023-05-01)
# [[Zig 语言更新]($section.id('zig-language-updates'))](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-04-01..2023-05-01)
2 changes: 1 addition & 1 deletion content/monthly/202305.smd
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ A 2048 game to run in terminal
[mitchellh/zig](https://github.com/mitchellh/zig-objc)
Objective-C runtime bindings for Zig (Zig calling ObjC).

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-04-01..2023-05-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202306.smd
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Shell completions for the Zig compiler.
[menduz/zig](https://github.com/menduz/zig-steamworks)
Steamwork bindings for Zig.

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-05-01..2023-06-01)
# [[Zig 语言更新]($section.id('zig-language-updates'))](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-05-01..2023-06-01)

- [WASI: Implement experimental threading support by Luukdegram · Pull
Request \#16207 ·
Expand Down
2 changes: 1 addition & 1 deletion content/monthly/202307.smd
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ Experimental operating system written in Zig
[EugenHotaj/zig_gpt2](https://github.com/EugenHotaj/zig_gpt2)
GPT-2 inference engine written in Zig

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-06-01..2023-07-01)
# [[Zig 语言更新]($section.id('zig-language-updates'))](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-06-01..2023-07-01)
2 changes: 1 addition & 1 deletion content/monthly/202308.smd
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,4 @@ Andrew 的最新文章,远离社交平台!
- [Mach v0.2
released](https://devlog.hexops.com/2023/mach-v0.2-released/)

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-07-01..2023-08-01)
# [[Zig 语言更新]($section.id('zig-language-updates'))](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-07-01..2023-08-01)
2 changes: 1 addition & 1 deletion content/monthly/202309.smd
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Reactive signal/Dependency tracking library in Zig.
[buzz-language/buzz](https://github.com/buzz-language/buzz)
A small/lightweight statically typed scripting language

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-08-01..2023-09-01)
# [Zig 语言更新]($section.id('zig-language-updates'))

[Aro translate](https://github.com/ziglang/zig/pull/17221)
用 Zig 写的 [Aro](https://github.com/Vexu/arocc) 来替换 clang,来实现
Expand Down
2 changes: 1 addition & 1 deletion content/monthly/202310.smd
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ Enable the use of Zig code in JavaScript project
Language server for GLSL (autocomplete, goto-definition, formatter, and
more)

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-09-01..2023-10-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202311.smd
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ Fields
[akhildevelops/cudaz](https://github.com/akhildevelops/cudaz)
A Zig Cuda wrapper

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2023-10-01..2023-11-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202402.smd
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ Zig-TypeScript binding generator 🟦 🦎
[sneekyfoxx/ziggy](https://github.com/sneekyfoxx/ziggy)
又又一个 Zig 版本管理工具

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2024-02-01..2023-03-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202403.smd
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,4 @@ ability of running pipeline like bash.
[zigcc/zig-milestone](https://github.com/zigcc/zig-milestone)
Zig milstone monitor

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2024-02-01..2024-03-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202404.smd
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ Zig string library that includes small string optimization on the stack
[FalsePattern/ZigBrains](https://github.com/FalsePattern/ZigBrains)
Yet another zig language plugin for intellij

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2024-04-01..2024-05-01)
[Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202405.smd
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ A generic and general purpose Set implementation for the Zig language
[akarpovskii/tuile](https://github.com/akarpovskii/tuile)
A Text UI library for Zig

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2024-05-01..2024-06-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/202406.smd
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,4 @@ Zig WebAssembly Runtime Engine
io_uring like asynchronous API and coroutine powered IO tasks
for zig

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2024-06-01..2024-07-01)
# [[Zig 语言更新]($section.id('zig-language-updates'))](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2024-06-01..2024-07-01)
2 changes: 1 addition & 1 deletion content/monthly/202407.smd
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ fn get_window_messages() [65536][:0]const u8 {
- 在 JavaScript
允许您内联表达式的某些情况下,您可能需要分解出一个变量来澄清生存期。看看[这个问题](https://github.com/ziglang/zig/issues/12414)。

# [项目/工具]($section.id('projects-tools'))
# [项目/工具]($section.id('projects-and-tools'))

[18alantom/fex](https://github.com/18alantom/fex)
A command-line file explorer prioritizing quick navigation.
Expand Down
2 changes: 1 addition & 1 deletion content/monthly/202410.smd
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ Video editor 🎬 written in Zig ⚡ using raylib
[pwbh/ymlz](https://github.com/pwbh/ymlz)
Small and convenient yaml parser for Zig

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2024-10-01..2024-11-01)
# [[Zig 语言更新]($section.id('zig-language-updates'))](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2024-10-01..2024-11-01)
2 changes: 1 addition & 1 deletion content/monthly/202411.smd
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ PDF reader for terminal emulators using the Kitty image protocol
[Dr-Nekoma/lyceum](https://github.com/Dr-Nekoma/lyceum)
An MMO game written in Erlang (+ PostgreSQL) + Zig (+ Raylib)

# [Zig 语言更新](https://github.com/ziglang/zig/pulls?page=1&q=+is%3Aclosed+is%3Apr+closed%3A2024-11-01..2024-12-01)
# [Zig 语言更新]($section.id('zig-language-updates'))
2 changes: 1 addition & 1 deletion content/monthly/index.smd
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
社区内的最新进展,信息来源:[Zig NEWS](https://zig.news/top/month)、[Zig
monthly](https://zigmonthly.org/)、[Lobsters](https://lobste.rs/t/zig)、[Reddit](https://www.reddit.com/r/Zig/)、[Zig
weekly
newsletter](https://discu.eu/weekly/zig/)、[Ziggit](https://ziggit.dev/)、[用户推荐](https://github.com/orgs/zigcc/discussions/new?category=%E4%BD%9C%E5%93%81%E5%88%86%E4%BA%AB)
newsletter](https://discu.eu/weekly/zig/)、[Ziggit](https://ziggit.dev/)、[用户推荐]($section.id('user-recommendations'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要改

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要改

幸亏有审查,没看到这行,有的是用ai改的 有的是我手动,这个应该是ai干的

2 changes: 1 addition & 1 deletion content/post/2023-09-05-bog-gc-1-en.smd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

Bog is a small scripting language developed using Zig. Its GC design is inspired by a paper titled [An efficient of Non-Moving GC for Function languages](https://www.pllab.riec.tohoku.ac.jp/papers/icfp2011UenoOhoriOtomoAuthorVersion.pdf).

# [Overview]($section.id('Overview'))
# [Overview]($section.id('overview'))

1. Introduction
- Design of the Heap
Expand Down
2 changes: 1 addition & 1 deletion content/post/2023-09-21-zig-midi.smd
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ pub const Message = struct {
- value 和 setValue 函数:用于获取和设置 MIDI 消息的值字段。
- Kind 枚举:定义了 MIDI 消息的所有可能种类,包括通道事件和系统事件。

## [midi 消息结构]($section.id('midi 消息结构'))
## [midi 消息结构]($section.id('midi-message-structure'))

我们需要先了解 MIDI 消息的一些背景。

Expand Down
14 changes: 7 additions & 7 deletions content/post/2023-12-24-zig-build-explained-part1.smd
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Zig 构建系统仍然缺少文档,对很多人来说,这是不使用它的

我们将从一个刚刚初始化的 Zig 项目开始,逐步深入到更复杂的项目。在此过程中,我们将学习如何使用库和软件包、添加 C 代码,甚至如何创建自己的构建步骤。

# [免责声明]($section.id('免责声明'))
# [免责声明]($section.id('disclaimer'))

由于我不会解释 Zig 语言的语法或语义,因此我希望你至少已经有了一些使用 Zig 的基本经验。我还将链接到标准库源代码中的几个要点,以便您了解所有这些内容的来源。我建议你阅读编译系统的源代码,因为如果你开始挖掘编译脚本中的函数,大部分内容都不言自明。所有功能都是在标准库中实现的,不存在隐藏的构建魔法。

# [开始]($section.id('开始'))
# [开始]($section.id('getting-started'))

我们通过新建一个文件夹来创建一个新项目,并在该文件夹中调用 zig init-exe。

Expand Down Expand Up @@ -56,7 +56,7 @@ pub fn build(b: *std.Build) void {
}
```

# [基础知识]($section.id('基础知识'))
# [基础知识]($section.id('basics'))

构建系统的核心理念是,Zig 工具链将编译一个 Zig 程序 (build.zig),该程序将导出一个特殊的入口点(`pub fn build(b: *std.build.Builder) void`),当我们调用 `zig build` 时,该入口点将被调用。

Expand Down Expand Up @@ -95,7 +95,7 @@ Step 遵循与 std.mem.Allocator 相同的接口模式,需要实现一个 make

现在,我们需要创建一个稍正式的 Zig 程序:

# [编译 Zig 源代码]($section.id('编译 Zig 源代码'))
# [编译 Zig 源代码]($section.id('compiling-zig-source-code'))

要使用编译系统编译可执行文件,编译器需要使用函数 Builder.addExecutable,它将为我们创建一个新的 LibExeObjStep。这个步骤实现是 zig build-exe、zig build-lib、zig build-obj 或 zig test 的便捷封装,具体取决于初始化方式。本文稍后将对此进行详细介绍。

Expand All @@ -118,7 +118,7 @@ pub fn build(b: *std.build.Builder) void {

这将始终在当前机器的调试模式下编译,因此对于初学者来说,这可能就足够了。但如果你想开始发布你的项目,你可能需要启用交叉编译:

# [交叉编译]($section.id('交叉编译'))
# [交叉编译]($section.id('cross-compilation'))

交叉编译是通过设置程序的目标和编译模式来实现的

Expand Down Expand Up @@ -187,7 +187,7 @@ zig build -Doptimize=ReleaseSmall

但我们仍然必须调用 zig build 编译,因为默认调用仍然没有任何作用。让我们改变一下!

# [安装工件]($section.id('安装工件'))
# [安装工件]($section.id('installing-artifacts'))

要安装任何东西,我们必须让它依赖于构建器的安装步骤。该步骤是已创建的,可通过 Builder.getInstallStep() 访问。我们还需要创建一个新的 InstallArtifactStep,将我们的 exe 文件复制到安装目录(通常是 zig-out)

Expand Down Expand Up @@ -254,7 +254,7 @@ pub fn build(b: *std.build.Builder) void {

现在,从理解初始构建脚本到完全扩展,还缺少一个部分:

# [运行已构建的应用程序]($section.id('运行已构建的应用程序'))
# [运行已构建的应用程序]($section.id('running-built-application'))

为了开发用户体验和一般便利性,从构建脚本中直接运行程序是非常实用的。这通常是通过运行步骤实现的,可以通过 zig build run 调用。

Expand Down
Loading