Fix interal links and work around errors for #comments links

Zola only checks the markdown source for link targets, so an error occurs if the target is in an template. This is the case for our `#comments` links, so we add a dummy target in a comment.
This commit is contained in:
Philipp Oppermann
2022-01-23 16:40:54 +01:00
parent ce51e833a8
commit 0d40ee3750
40 changed files with 59 additions and 19 deletions

View File

@@ -21,6 +21,7 @@ translators = ["wusyong"]
[GitHub]: https://github.com/phil-opp/blog_os
[at the bottom]: #comments
<!-- fix for zola anchor checker (target is in template): <a id="comments"> -->
[post branch]: https://github.com/phil-opp/blog_os/tree/post-01
<!-- toc -->
@@ -43,7 +44,7 @@ translators = ["wusyong"]
為了在 Rust 中建立 OS 核心我們需要建立一個無須底層作業系統即可運行的執行檔這類的執行檔通常稱為「獨立式freestanding」或「裸機bare-metal」的執行檔。
這篇文章描述了建立一個獨立的 Rust 執行檔的必要步驟,並解釋為什麼需要這些步驟。如果您只對簡單的範例感興趣,可以直接跳到 **[總結](#總結)**。
這篇文章描述了建立一個獨立的 Rust 執行檔的必要步驟,並解釋為什麼需要這些步驟。如果您只對簡單的範例感興趣,可以直接跳到 **[總結](#summary)**。
## 停用標準函式庫
@@ -450,7 +451,7 @@ rustflags = ["-C", "link-args=-e __start -static -nostartfiles"]
</details>
## 總結
## 總結 {#summary}
一個最小的 Rust 獨立執行檔會看起來像這樣:
@@ -516,4 +517,4 @@ cargo rustc -- -C link-args="-e __start -static -nostartfiles"
[下一篇文章][next post] 將會講解如何將我們的獨立執行檔轉成最小的作業系統核心。這包含建立自訂目標、用啟動程式組合我們的執行檔,還有學習如何輸出一些東西到螢幕上。
[next post]: @/edition-2/posts/02-minimal-rust-kernel/index.md
[next post]: @/edition-2/posts/02-minimal-rust-kernel/index.md