From 73fd3d4b1e7d8bcdce82adf58966788bce0be90d Mon Sep 17 00:00:00 2001 From: KaiserY Date: Sun, 17 Dec 2023 23:10:27 +0800 Subject: [PATCH] fix ci --- .github/workflows/main.yml | 2 +- book.toml | 1 - src/ch01-02-hello-world.md | 2 +- src/ch05-03-method-syntax.md | 2 +- template.typ | 50 ------------------------------------ 5 files changed, 3 insertions(+), 54 deletions(-) delete mode 100644 template.typ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5635667..044a305 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ jobs: echo "$(pwd)/bin" >> ${GITHUB_PATH} - name: Install mdbook-typst-pdf run: | - curl -sL -o bin/mdbook-typst-pdf https://github.com/KaiserY/mdbook-typst-pdf/releases/download/0.1.1/mdbook-typst-pdf-x86_64-unknown-linux-gnu + curl -sL -o bin/mdbook-typst-pdf https://github.com/KaiserY/mdbook-typst-pdf/releases/download/0.1.2/mdbook-typst-pdf-x86_64-unknown-linux-gnu chmod +x bin/mdbook-typst-pdf echo "$(pwd)/bin" >> ${GITHUB_PATH} - name: Install font diff --git a/book.toml b/book.toml index 7eb7df2..626a10c 100644 --- a/book.toml +++ b/book.toml @@ -11,5 +11,4 @@ git-repository-url = "https://github.com/KaiserY/trpl-zh-cn/tree/main" edit-url-template = "https://github.com/KaiserY/trpl-zh-cn/edit/main/{path}" [output.typst-pdf] -custom-template = "template.typ" pdf = true diff --git a/src/ch01-02-hello-world.md b/src/ch01-02-hello-world.md index bc4fedf..8f6ab95 100644 --- a/src/ch01-02-hello-world.md +++ b/src/ch01-02-hello-world.md @@ -139,4 +139,4 @@ $ ./main # Windows 是 .\main.exe 仅仅使用 `rustc` 编译简单程序是没问题的,不过随着项目的增长,你可能需要管理你项目的方方面面,并让代码易于分享。接下来,我们要介绍一个叫做 Cargo 的工具,它会帮助你编写真实世界中的 Rust 程序。 [troubleshooting]: ch01-01-installation.html#troubleshooting -[devtools]: appendix-04-useful-development-tools.md +[devtools]: appendix-04-useful-development-tools.html diff --git a/src/ch05-03-method-syntax.md b/src/ch05-03-method-syntax.md index 0a67ba8..415d32e 100644 --- a/src/ch05-03-method-syntax.md +++ b/src/ch05-03-method-syntax.md @@ -135,6 +135,6 @@ Can rect1 hold rect3? false 但结构体并不是创建自定义类型的唯一方法:让我们转向 Rust 的枚举功能,为你的工具箱再添一个工具。 [enums]: ch06-00-enums.html -[trait-objects]: ch17-02-trait-objects.md +[trait-objects]: ch17-02-trait-objects.html [public]: ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html#exposing-paths-with-the-pub-keyword [modules]: ch07-02-defining-modules-to-control-scope-and-privacy.html diff --git a/template.typ b/template.typ deleted file mode 100644 index c5845d8..0000000 --- a/template.typ +++ /dev/null @@ -1,50 +0,0 @@ -#set text( - lang: "zh", - font: ( - "Noto Sans", - "Noto Sans SC", - "Noto Sans Arabic", - "Noto Sans Hebrew", - "Noto Sans Devanagari, - ), -) - -#show link: underline - -#show raw.where(block: true): block.with( - fill: luma(240), - inset: 10pt, - radius: 4pt, -) - -#show quote.where(block: true): block.with( - fill: rgb("#f1f6f9"), - inset: 10pt, - radius: 4pt, -) - -#set page( - header: locate(loc => { - if counter(page).at(loc).first() > 1 [ - MDBOOK_TYPST_PDF_TITLE - ] - }), - footer: locate(loc => { - if counter(page).at(loc).first() > 1 [ - #counter(page).display( - "1/1", - both: true, - ) - ] - }), -) - -#align(center, text(17pt)[ - *MDBOOK_TYPST_PDF_TITLE* -]) - -#pagebreak() -#outline(depth: 2, indent: 1em) -#pagebreak() - -/**** MDBOOK_TYPST_PDF_PLACEHOLDER ****/