Skip to content

Commit 0ac2695

Browse files
docs: clarify how to use this project
Relates-to: #4
1 parent 471d3ec commit 0ac2695

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
## Local preview
44

5-
First install [mdbook](https://rust-lang.github.io/mdBook/guide/installation.html), [uv](https://docs.astral.sh/uv/#installation), [just](https://just.systems/man/en/), and rust toolchains, then run:
5+
1. Install [mdbook](https://rust-lang.github.io/mdBook/guide/installation.html), [uv](https://docs.astral.sh/uv/#installation), [just](https://just.systems/man/en/), and the [rust toolchain](https://rustup.rs).
6+
7+
2. Clone this repository and change to the directory.
8+
9+
3. Run the following commands.
610

711
```shell
812
cargo install --git https://github.com/sitandr/mdbook-typst-highlight --branch main # d7c197c6, the unreleased version

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
# Typst Extra Docs
22

33
[![GitHub repo size](https://img.shields.io/github/repo-size/typst-community/extra-docs)](https://github.com/typst-community/extra-docs)
4-
[![Website](https://img.shields.io/website?url=https%3A%2F%2Ftypst-community.github.io%2Fextra-docs%2F)](https://typst-community.github.io/extra-docs/)
4+
[![Website](https://img.shields.io/website?url=https%3A%2F%2Ftypst-community.github.io%2Fextra-docs%2F)][homepage]
5+
6+
[homepage]: https://typst-community.github.io/extra-docs/
57

68
This is an _unofficial_ collection of extra official documentations for Typst.
79

810
- [Typst's official GitHub repositories (github.com/typst)](https://github.com/orgs/typst/repositories?type=source&q=mirror%3Afalse+fork%3Afalse+archived%3Afalse) contain some files that are missing in the official [Typst Documentation (typst.app/docs)](https://typst.app/docs/). These files are collected here to help with reading and searching.
911

12+
To view these files, visit the [Typst Extra Docs website][homepage].<!-- NOTE: This line will be parsed by download.py. -->
13+
1014
- [Snapshots of the official Typst Documentation](./src/zim/index.md) are also stored here, for reading offline or using previous versions.
1115

16+
To download and use them, refer to the page [Snapshots of Docs](./src/zim/index.md).
17+
1218
## See also
1319

1420
- [hypher — Docs.rs](https://docs.rs/crate/hypher/latest) lists the languages supported by Typst for hyphenation.

scripts/download.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,13 @@ def load_versions() -> dict[Literal["typst", "codex", "hayagriva", "packages"],
159159
versions = load_versions()
160160

161161
(src_dir / "index.md").write_text(
162-
(src_dir.parent / "README.md").read_text(encoding="utf-8").replace("](./src/", "](./"),
162+
(src_dir.parent / "README.md")
163+
.read_text(encoding="utf-8")
164+
.replace("](./src/", "](./")
165+
.replace(
166+
"visit the [Typst Extra Docs website][homepage].<!-- NOTE: This line will be parsed by download.py. -->",
167+
"continue browsing this website.",
168+
),
163169
encoding="utf-8",
164170
)
165171

0 commit comments

Comments
 (0)