Skip to content

Commit

Permalink
fix doc/book mdbook index bug by using a PR repo
Browse files Browse the repository at this point in the history
  • Loading branch information
e1732a364fed committed Jan 1, 2099
1 parent 684f33a commit de860f7
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 19 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/deploy_book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
# - name: Install latest mdbook
# run: |
# tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
# url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
# mkdir mdbook
# curl -sSL $url | tar -xz --directory=./mdbook
# echo `pwd`/mdbook >> $GITHUB_PATH
- name: Install mdbook(with fix) from git
uses: baptiste0928/cargo-install@v3
with:
crate: mdbook
git: https://github.com/HU90m/mdBook
- name: Build Book
run: |
cd doc/book
Expand Down
12 changes: 12 additions & 0 deletions doc/book/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,15 @@
学习 mdbook:
https://rust-lang.github.io/mdBook/guide/creating.html
https://github.com/rust-lang/mdBook/wiki/Automated-Deployment%3A-GitHub-Actions

2024.12.20

发现生成的目录是有问题的,只有在主页时可用,在其它页面时,
因为相对路径的关系,变得不可访问

关联issue
https://github.com/rust-lang/mdBook/issues/2060

因此目前使用的 mdbook 是 HU90m 的 补丁版:
cargo install --git https://github.com/HU90m/mdBook.git mdbook

14 changes: 7 additions & 7 deletions doc/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Summary

- [读我](./readme.md)
- [读我](index.md)

- [ruci-cmd程序](./app/cmd.md)
- [lua配置](./lua/lua.md)
- [Config入门](./lua/config_intro.md)
- [MapConfig](./lua/map_config.md)
- [Route Config](./lua/route_config.md)
- [Infinite](./lua/infinite.md)
- [ruci-cmd程序](app/cmd.md)
- [lua配置](lua/lua.md)
- [Config入门](lua/config_intro.md)
- [MapConfig](lua/map_config.md)
- [Route Config](lua/route_config.md)
- [Infinite](lua/infinite.md)
3 changes: 3 additions & 0 deletions doc/book/src/app/cmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ ruci-cmd 会在 下面文件夹中 找 指定的 配置文件
然后 自己创建一个 ruci_config 文件夹,将自己的配置放在 ruci_config 中,这样
就不会产生混淆

另外,配置文件名称是可以自定义的,不一定要叫 local.lua 或 remote.lua, 这只是
一种命名习惯而已。

## log

两种选择,使用命令行参数 或者使用 环境变量
Expand Down
1 change: 0 additions & 1 deletion doc/book/src/readme.md → doc/book/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@

[lua配置](./lua/lua.md)


本手册基于 ruci v0.0.6 制作
4 changes: 2 additions & 2 deletions doc/book/src/lua/config_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,5 +276,5 @@ windows:
测试成功!


下一步,学习 [各个 `MapConfig` 的写法 ](./map_config.md)
或者直接开始学 [各个 route 的写法](./route_config.md)
下一步,学习 [各个 `MapConfig` 的写法 ](map_config.md)
或者直接开始学 [各个 route 的写法](route_config.md)
2 changes: 1 addition & 1 deletion doc/book/src/lua/map_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -643,4 +643,4 @@ listen 一个 本地的 udp 端口 (a), 指定 ext.fixed_target_addr (b), 其为
现在再读 resource/local.lua 就会轻松很多了。

学点难的?
[Infinite](./lua/infinite.md)
[Infinite](infinite.md)
2 changes: 1 addition & 1 deletion doc/book/src/lua/route_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ userset 用于判断 在 InChain 中 那些需要 密码 的 Map 中 使用了
# 接下来

学点难的?
[Infinite](./infinite.md)
[Infinite](infinite.md)

0 comments on commit de860f7

Please sign in to comment.