Skip to content

Commit

Permalink
切换到 mnbook 构建
Browse files Browse the repository at this point in the history
  • Loading branch information
chai2010 committed Aug 8, 2024
1 parent 6849a40 commit b76e3be
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 572 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ 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.21

- run: mdbook build
- run: go version
- run: go env

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

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

# install mkbook
#
# MnBook: Mini Markdown Book
# https://github.com/wa-lang/mnbook
#

default:
mdbook serve
mnbook serve

build:
-rm book
mnbook build
-rm book/.gitignore
-rm -rf book/.git

clean:
-rm -rf book
30 changes: 30 additions & 0 deletions book.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# https://giscus.app
# https://github.com/badboy/mdbook-mermaid

[book]
title = "Go语言圣经"
authors = ["译者:", "chai2010", "Xargin", "CrazySssst", "foreversmart"]
description = "<The Go Programming Language>中文版"
language = "zh"
multilingual = false
src = "."

[build]
build-dir = "book"

[custom]
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>"
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>"
page_footer = "<span>© 2015-2016 | <a href=\"https://github.com/gopl-zh\"> Go语言圣经中文版</a>, 仅学习交流使用</span>"

[giscus]
enaled = true
data_repo = "gopl-zh/gopl-zh.github.com"
data_repo_id = "MDEwOlJlcG9zaXRvcnk2MTUzMTQ2Mw=="
data_category = "General"
data_category_id = "DIC_kwDOA6rlR84CQnJW"

[output.html]
git-repository-url = "https://github.com/gopl-zh/gopl-zh.github.com"
edit-url-template = "https://github.com/gopl-zh/gopl-zh.github.com/edit/master/{path}"
git-repository-icon = "fa-github"
20 changes: 0 additions & 20 deletions book.toml

This file was deleted.

1 change: 0 additions & 1 deletion js/bigPicture.js

This file was deleted.

146 changes: 0 additions & 146 deletions js/custom.js

This file was deleted.

54 changes: 0 additions & 54 deletions style.css

This file was deleted.

Loading

0 comments on commit b76e3be

Please sign in to comment.