Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/typst-doc-cn/tutorial
Typst中文教程
https://github.com/typst-doc-cn/tutorial
Last synced: 3 months ago
JSON representation
Typst中文教程
- Host: GitHub
- URL: https://github.com/typst-doc-cn/tutorial
- Owner: typst-doc-cn
- License: apache-2.0
- Created: 2024-01-26T16:30:29.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-06T06:35:44.000Z (3 months ago)
- Last Synced: 2024-08-07T07:26:24.851Z (3 months ago)
- Language: Typst
- Homepage: https://typst-doc-cn.github.io/tutorial/
- Size: 1.24 MB
- Stars: 76
- Watchers: 0
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tutorial
Typst 中文教程
[![下载最新版本](https://custom-icon-badges.demolab.com/badge/-Download-blue?style=for-the-badge&logo=download&logoColor=white "下载最新版本")](https://nightly.link/typst-doc-cn/tutorial/workflows/build/main/ebook.zip) **(latest 版本)**
[![下载最新版本](https://custom-icon-badges.demolab.com/badge/-Download-blue?style=for-the-badge&logo=download&logoColor=white "下载最新版本")](https://github.com/typst-doc-cn/tutorial/releases/download/v0.1.0/Typst.Tutorial.CN.v0.1.0.pdf) **(0.1.0 版本)**
## 安装字体
```bash
git submodule update --init --recursive
```## 托管为静态网站
```bash
shiroa serve --font-path ./assets/typst-fonts/ --font-path ./assets/fonts/ -w . ./src/
```## 编译为静态网站
```bash
shiroa build --font-path ./assets/typst-fonts/ --font-path ./assets/fonts/ -w . ./src/
```## 编译电子书
```bash
typst compile --root . --font-path ./assets/typst-fonts/ --font-path ./assets/fonts/ ./src/ebook.typ
```## 编译单独章节
选择一个章节文件,比如 `第一章.typ`,然后执行:
```bash
typst compile --root . --font-path ./assets/typst-fonts/ --font-path ./assets/fonts/ 章节文件.typ
```## 复现 Artifacts
生成`typst-docs-v0.11.0.json`:
```bash
cargo install --git https://github.com/typst/typst --locked typst-docs --features="cli" --tag v0.11.0
typst-docs --out-file ./assets/artifacts/typst-docs-v0.11.0.json --assets-dir target/typst-docs/assets
```