Skip to content

chinanf-boy/mdbook-nice-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdbook 好的 例子 (60%,亦可用)

类(gitbooks)文档,专服务于Rust语言的md文档

mdbook本身,还有很多小 bug,所以使用过程 不要过于纠结

请安装mdbook

cargo install mdbook

覆盖旧版本,需要--force

更多安装信息

看看

git clone https://github.com/chinanf-boy/mdbook-nice-example.git
  • 2.1 cd *, look html
mdbook serve --open

book.toml + src/SUMMARY.md

book.toml是配置,src/SUMMARY.md就是书的骨架

其实,本库就是一个模范示例, 直接clone魔改就好。当然你还能用mdbook init --theme拿到原始示例。

模范?,有啥

  • 1. 加了个编辑按钮

可通过,在index.hbs修改成自己的源项目地址

例子

src/index.hbs

document.getElementById("edit-button").addEventListener("click", function(){
    var editWindow = window.open("https://github.com/chinanf-boy/mdbook-nice-example/edit/master/src/{{ path }}");
});

chinanf-boy/mdbook-nice-example 改成你的 存储库,


  • 2. git_repository_url 不成功
git_repository_url = "https://github.com/chinanf-boy/mdbook-nice-example"
git_repository_icon = "fa-github"

且,hbs模版是有添加的,我想这就是bug吧

  • anything,其他杂七杂八的都在book.toml

NOTE > Issue me , If you have question with this repo. But, about the bug of mdbook, please Link that Source Page

相关

mostly 💡 come from mdbook / rust-cookbook themes

Releases

No releases published

Packages

No packages published