Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chinanf-boy/mdbook-nice-example
example: 已不更新 2022-1-1 <mdbook v0.4.15>
https://github.com/chinanf-boy/mdbook-nice-example
example mdbook zh
Last synced: 19 days ago
JSON representation
example: 已不更新 2022-1-1 <mdbook v0.4.15>
- Host: GitHub
- URL: https://github.com/chinanf-boy/mdbook-nice-example
- Owner: chinanf-boy
- Created: 2018-11-14T03:33:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-19T03:38:45.000Z (over 5 years ago)
- Last Synced: 2024-10-28T05:19:24.481Z (2 months ago)
- Topics: example, mdbook, zh
- Language: HTML
- Homepage: https://chinanf-boy.github.io/mdbook-nice-example
- Size: 843 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## mdbook 好的 例子 (60%,亦可用)
类(gitbooks)文档,专服务于Rust语言的md文档
> mdbook本身,还有很多小 bug,所以使用过程 **不要过于纠结**
### 请安装mdbook
```
cargo install mdbook
```> 覆盖旧版本,需要`--force`
更多[安装信息](https://github.com/chinanf-boy/mdBook-zh#%E5%AE%89%E8%A3%85)
### 看看
- 1. [web网站](https://chinanf-boy.github.io/mdbook-nice-example)
- 2. Or `clone`
```
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](./src/SUMMARY.md)就是书的骨架
> 其实,本库就是一个模范示例, 直接clone魔改就好。当然你还能用`mdbook init --theme`拿到原始示例。
### 模范?,有啥
- [x] **1.** 加了个编辑按钮
可通过,在`index.hbs`[修改成自己的源项目地址](./theme/index.hbs#L163)
例子
> `src/index.hbs`
``` 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` 不成功
``` toml
git_repository_url = "https://github.com/chinanf-boy/mdbook-nice-example"
git_repository_icon = "fa-github"
```且,hbs模版是[有添加的](./theme/index.hbs#L128),我想这就是bug吧
- [x] anything,其他杂七杂八的都在[book.toml]
> **NOTE >** Issue me , If you have question with this repo.
> But, about the bug of mdbook, please Link [that Source Page][mdbook]### 相关
[book.toml]: book.toml
> mostly :bulb: come from [mdbook] / [rust-cookbook] themes
[mdbook]: https://github.com/rust-lang-nursery/mdBook
[rust-cookbook]: https://github.com/rust-lang-nursery/rust-cookbook- [mdbook 中文文档](https://github.com/chinanf-boy/mdbook-zh)