Skip to content

Commit

Permalink
启用 mnbook 工具
Browse files Browse the repository at this point in the history
  • Loading branch information
chai2010 committed Oct 13, 2023
1 parent f4797ec commit 4ec350b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ jobs:
- name: Git checkout
uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
- name: Set up Go
uses: actions/setup-go@v2
with:
mdbook-version: '0.4.10'
# mdbook-version: 'latest'
go-version: 1.17

- run: go version
- run: go go install github.com/wa-lang/mnbook@latest

- run: make build

Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# go install github.com/wa-lang/mnbook@latest

default:
mdbook serve
mnbook serve

build:
-rm book
mdbook build
mnbook build
make -C en build
-rm book/.gitignore
-rm -rf book/.git

deploy:
-rm book
mdbook build
mnbook build
make -C en build
-rm book/.gitignore
-rm -rf book/.git
Expand Down
6 changes: 3 additions & 3 deletions en/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
default:
mdbook serve
mnbook serve

build:
-rm ../book/en
-rm -rf ../book/en
mkdir -p ../book/en
mdbook build -d ../book/en
mnbook build && mv ./book ./en && mv ./en ../book/
-rm ../book/en/.gitignore

clean:
Expand Down
2 changes: 1 addition & 1 deletion en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[Wa-lang's manual](index.md)
[Preface](preface.md)

* [1.Install And Get Start](./1.InstallAndGetStart/readme.md)
* [Install And Get Start](./1.InstallAndGetStart/readme.md)
- [hello world](./1.InstallAndGetStart/1.1.HelloWorld.md)
- [Install Wa-lang Compiler](./1.InstallAndGetStart/1.2.Install.md)
- [wa command line](./1.InstallAndGetStart/1.3.Command.md)
Expand Down
2 changes: 1 addition & 1 deletion en/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Wa-lang's Manual

<img width="520px" height="660px" src="cover.svg" />
![](cover.svg)

- Github: [https://github.com/wa-lang/wa](https://github.com/wa-lang/wa)
- Online manual: [https://wa-lang.github.io/man/en/](https://wa-lang.github.io/man/en/)
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img width="520px" height="660px" src="cover.svg" />
![](cover.svg)

- 在线地址:[https://wa-lang.org/man/](https://wa-lang.org/man/)
- 在线地址(英文):[https://wa-lang.github.io/man/en/](https://wa-lang.github.io/man/en/)
Expand Down

0 comments on commit 4ec350b

Please sign in to comment.