From b1a1d87d4f0f3af724a761278b17b2bbff8f2fd2 Mon Sep 17 00:00:00 2001 From: vitalyr Date: Tue, 4 Aug 2020 23:33:27 +0800 Subject: [PATCH 1/3] add github icon and enable mathjax support --- docs/book.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/book.toml b/docs/book.toml index aebc721..6177532 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -6,3 +6,8 @@ src = "src" title = "简明 zCore 教程" [output.html.playpen] editable = true +[output.html] +git-repository-url = "https://github.com/rcore-os/zCore-Tutorial" +mathjax-support = true +[preprocessor.mathjax] +renderers = ["html"] \ No newline at end of file From cecdbb445f83cbb69c25e2323fd0689b2ea3e6cf Mon Sep 17 00:00:00 2001 From: vitalyr Date: Wed, 5 Aug 2020 00:07:33 +0800 Subject: [PATCH 2/3] mdbook: enable search, prepare to enable majax support --- docs/book.toml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/book.toml b/docs/book.toml index 6177532..1678248 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -4,10 +4,22 @@ language = "cn" multilingual = false src = "src" title = "简明 zCore 教程" +[rust] +edition = "2018" [output.html.playpen] editable = true [output.html] git-repository-url = "https://github.com/rcore-os/zCore-Tutorial" -mathjax-support = true -[preprocessor.mathjax] -renderers = ["html"] \ No newline at end of file +# mathjax-support = true +# [preprocessor.mathjax] +# renderers = ["html"] +[output.html.search] +enable = true +limit-results = 30 +teaser-word-count = 30 +use-boolean-and = true +boost-title = 2 +boost-hierarchy = 1 +boost-paragraph = 1 +expand = true +heading-split-level = 3 \ No newline at end of file From 435c09e7ac4e0f29537b651e89eb90b61784d94c Mon Sep 17 00:00:00 2001 From: vitalyr Date: Wed, 5 Aug 2020 00:09:02 +0800 Subject: [PATCH 3/3] add missing code in the tutorial: `use alloc::string::String;` --- docs/src/ch01-01-kernel-object.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/ch01-01-kernel-object.md b/docs/src/ch01-01-kernel-object.md index d7dc10b..ee06cf0 100644 --- a/docs/src/ch01-01-kernel-object.md +++ b/docs/src/ch01-01-kernel-object.md @@ -113,6 +113,7 @@ Rust 是一门部分面向对象的语言,我们通常用它的 trait 实现 首先创建一个 `KernelObject` trait 作为内核对象的公共接口: ```rust,noplaypen +use alloc::string::String; // src/object/mod.rs /// 内核对象公共接口 pub trait KernelObject: Send + Sync {