From 5e06d064f28c381a42ad4b310c08fa9ae2b79a7d Mon Sep 17 00:00:00 2001 From: "Unisko PENG," Date: Tue, 28 Mar 2023 21:32:45 +0800 Subject: [PATCH] Added mdbook-pagetoc preprocessor --- .gitignore | 3 +++ book.toml | 5 +++++ index.html | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 05ff2e4..3d46ce1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ book target +theme/index.hbs +theme/pagetoc.css +theme/pagetoc.js diff --git a/book.toml b/book.toml index 981eaf0..67275f6 100644 --- a/book.toml +++ b/book.toml @@ -4,3 +4,8 @@ language = "zh_CN" multilingual = false src = "src" title = "Yet another Chinese rust-lang book." + +[preprocessor.pagetoc] +[output.html] +additional-css = ["theme/pagetoc.css"] +additional-js = ["theme/pagetoc.js"] diff --git a/index.html b/index.html index 4b53668..78c92dc 100644 --- a/index.html +++ b/index.html @@ -29,6 +29,7 @@ + @@ -143,7 +144,7 @@
-
+

Rust 编程语言

原著:The Rust Programming Language

原作者:Steve Klabnik 与 Carol Nichols, 及 Rust 社区

@@ -254,6 +255,7 @@ rustc 1.68.0 (2c8cc3432 2023-03-06) +