Skip to content

Commit b76e3be

Browse files
committed
切换到 mnbook 构建
1 parent 6849a40 commit b76e3be

File tree

8 files changed

+50
-572
lines changed

8 files changed

+50
-572
lines changed

.github/workflows/book.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ jobs:
1818
- name: Git checkout
1919
uses: actions/checkout@v2
2020

21-
- name: Setup mdBook
22-
uses: peaceiris/actions-mdbook@v1
21+
- name: Set up Go
22+
uses: actions/setup-go@v2
2323
with:
24-
mdbook-version: '0.4.10'
25-
# mdbook-version: 'latest'
24+
go-version: 1.21
2625

27-
- run: mdbook build
26+
- run: go version
27+
- run: go env
28+
29+
- run: go install github.com/wa-lang/mnbook@latest
30+
- run: mnbook build
2831

2932
- name: Deploy
3033
uses: peaceiris/actions-gh-pages@v3

Makefile

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,19 @@
22
# Use of this source code is governed by a BSD-style
33
# license that can be found in the LICENSE file.
44

5-
# install mkbook
5+
#
6+
# MnBook: Mini Markdown Book
7+
# https://github.com/wa-lang/mnbook
8+
#
69

710
default:
8-
mdbook serve
11+
mnbook serve
12+
13+
build:
14+
-rm book
15+
mnbook build
16+
-rm book/.gitignore
17+
-rm -rf book/.git
918

1019
clean:
20+
-rm -rf book

book.ini

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# https://giscus.app
2+
# https://github.com/badboy/mdbook-mermaid
3+
4+
[book]
5+
title = "Go语言圣经"
6+
authors = ["译者:", "chai2010", "Xargin", "CrazySssst", "foreversmart"]
7+
description = "<The Go Programming Language>中文版"
8+
language = "zh"
9+
multilingual = false
10+
src = "."
11+
12+
[build]
13+
build-dir = "book"
14+
15+
[custom]
16+
content_header = "<ul dir=\"auto\"><li><em>凹语言(Go实现, 面向WASM设计): <a href=\"https://github.com/wa-lang/wa\">https://github.com/wa-lang/wa</a></em></li><li><em>MnBook(Go语言实现的MD电子书构建工具): <a href=\"https://github.com/wa-lang/mnbook\">https://github.com/wa-lang/mnbook</a></em></li></ul><hr>"
17+
content_footer = "<hr><table><tr><td><img width=\"222px\" src=\"https://chai2010.cn/advanced-go-programming-book/css.png\"></td><td><img width=\"222px\" src=\"https://chai2010.cn/advanced-go-programming-book/cch.png\"></td></tr></table>"
18+
page_footer = "<span>© 2015-2016 | <a href=\"https://github.com/gopl-zh\"> Go语言圣经中文版</a>, 仅学习交流使用</span>"
19+
20+
[giscus]
21+
enaled = true
22+
data_repo = "gopl-zh/gopl-zh.github.com"
23+
data_repo_id = "MDEwOlJlcG9zaXRvcnk2MTUzMTQ2Mw=="
24+
data_category = "General"
25+
data_category_id = "DIC_kwDOA6rlR84CQnJW"
26+
27+
[output.html]
28+
git-repository-url = "https://github.com/gopl-zh/gopl-zh.github.com"
29+
edit-url-template = "https://github.com/gopl-zh/gopl-zh.github.com/edit/master/{path}"
30+
git-repository-icon = "fa-github"

book.toml

-20
This file was deleted.

js/bigPicture.js

-1
This file was deleted.

js/custom.js

-146
This file was deleted.

style.css

-54
This file was deleted.

0 commit comments

Comments
 (0)