Skip to content

Commit d180777

Browse files
committed
改名为 wabook
1 parent 4e071e9 commit d180777

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+252
-112
lines changed

.github/workflows/mnbook.yml .github/workflows/wabook.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @2023 凹语言 作者。保留所有权利。
22

3-
name: MnBook
3+
name: waBook
44
on:
55
pull_request:
66
push:
@@ -27,7 +27,7 @@ jobs:
2727

2828
Publish:
2929
runs-on: ubuntu-latest
30-
if: ${{github.repository == 'wa-lang/mnbook'}}
30+
if: ${{github.repository == 'wa-lang/wabook'}}
3131
needs: [Test]
3232
steps:
3333
- name: Checkout

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ debug:
1717
-rm -rf ./testdata/_book
1818

1919
go run main.go build ./testdata && cd ./testdata && mv book _book_go
20-
cd ./testdata && mnbook build && mv book _book
20+
cd ./testdata && wabook build && mv book _book
2121
cd ./testdata && mv _book_go book
2222

2323
clean:

README-zh.md

+119

README.md

+39-27

changelog.md

+9

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/wa-lang/mnbook
1+
module github.com/wa-lang/wabook
22

33
go 1.21
44

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
// A tool for build markdown book
66
package main
77

8-
import "github.com/wa-lang/mnbook/pkg/cmd"
8+
import "github.com/wa-lang/wabook/pkg/cmd"
99

1010
func main() { cmd.Main() }

pkg/cmd/_example_book/book.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ title = "book title"
77

88
[output.html]
99
git-repository-icon = "fa-github"
10-
git-repository-url = "https://github.com/wa-lang/mnbook"
11-
edit-url-template = "https://github.com/wa-lang/mnbook/edit/master/testdata/{path}"
10+
git-repository-url = "https://github.com/wa-lang/wabook"
11+
edit-url-template = "https://github.com/wa-lang/wabook/edit/master/testdata/{path}"

pkg/cmd/cmd_build.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010

1111
cli "github.com/urfave/cli/v2"
1212

13-
"github.com/wa-lang/mnbook/pkg/mnbook"
14-
"github.com/wa-lang/mnbook/pkg/render"
13+
"github.com/wa-lang/wabook/pkg/render"
14+
"github.com/wa-lang/wabook/pkg/wabook"
1515
)
1616

1717
var CmdBuild = &cli.Command{
@@ -32,7 +32,7 @@ var CmdBuild = &cli.Command{
3232
}
3333

3434
func BuildBook(path string) error {
35-
book, err := mnbook.LoadBook(path)
35+
book, err := wabook.LoadBook(path)
3636
if err != nil {
3737
return fmt.Errorf("LoadBook: %w", err)
3838
}

pkg/cmd/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
func Main() {
1717
cliApp := cli.NewApp()
18-
cliApp.Name = "mnbook"
18+
cliApp.Name = "wabook"
1919
cliApp.Usage = "A tool for build mini markdown book"
2020
cliApp.HideHelpCommand = true
2121
cliApp.Version = func() string {
@@ -28,7 +28,7 @@ func Main() {
2828
}()
2929

3030
cliApp.CustomAppHelpTemplate = cli.AppHelpTemplate +
31-
"\n See \"https://github.com/wa-lang/mnbook\" for more information.\n"
31+
"\n See \"https://github.com/wa-lang/wabook\" for more information.\n"
3232

3333
cliApp.Action = func(ctx *cli.Context) error {
3434
if ctx.NArg() > 0 {

pkg/render/_static/.nojekyll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This file makes sure that Github Pages doesn't process mnbook's output.
1+
This file makes sure that Github Pages doesn't process wabook's output.

pkg/render/_static/static/mnbook/book.js pkg/render/_static/static/wabook/book.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ function playground_text(playground) {
232232

233233
function get_theme() {
234234
var theme;
235-
try { theme = localStorage.getItem('mnbook-theme'); } catch (e) { }
235+
try { theme = localStorage.getItem('wabook-theme'); } catch (e) { }
236236
if (theme === null || theme === undefined) {
237237
return default_theme;
238238
} else {
@@ -274,7 +274,7 @@ function playground_text(playground) {
274274
var previousTheme = get_theme();
275275

276276
if (store) {
277-
try { localStorage.setItem('mnbook-theme', theme); } catch (e) { }
277+
try { localStorage.setItem('wabook-theme', theme); } catch (e) { }
278278
}
279279

280280
html.classList.remove(previousTheme);
@@ -313,7 +313,7 @@ function playground_text(playground) {
313313
}
314314
});
315315

316-
// Should not be needed, but it works around an issue on macOS & iOS: https://github.com/rust-lang/mnbook/issues/628
316+
// Should not be needed, but it works around an issue on macOS & iOS: https://github.com/rust-lang/wabook/issues/628
317317
document.addEventListener('click', function(e) {
318318
if (themePopup.style.display === 'block' && !themeToggleButton.contains(e.target) && !themePopup.contains(e.target)) {
319319
hideThemes();
@@ -371,7 +371,7 @@ function playground_text(playground) {
371371
});
372372
sidebarToggleButton.setAttribute('aria-expanded', true);
373373
sidebar.setAttribute('aria-hidden', false);
374-
try { localStorage.setItem('mnbook-sidebar', 'visible'); } catch (e) { }
374+
try { localStorage.setItem('wabook-sidebar', 'visible'); } catch (e) { }
375375
}
376376

377377

@@ -393,7 +393,7 @@ function playground_text(playground) {
393393
});
394394
sidebarToggleButton.setAttribute('aria-expanded', false);
395395
sidebar.setAttribute('aria-hidden', true);
396-
try { localStorage.setItem('mnbook-sidebar', 'hidden'); } catch (e) { }
396+
try { localStorage.setItem('wabook-sidebar', 'hidden'); } catch (e) { }
397397
}
398398

399399
// Toggle sidebar

pkg/render/_static/static/mnbook/cover-example.svg pkg/render/_static/static/wabook/cover-example.svg

+2-2

0 commit comments

Comments
 (0)