You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/typst-docs-web/README.md
+77-5Lines changed: 77 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,76 @@
1
-
# website
1
+
# typst-docs-web
2
+
3
+
<divalign="center">
4
+
<imgsrc="./images/preview.png"alt="">
5
+
</div>
6
+
7
+
Build a website from the documentation JSON file generated by [typst-docs](https://github.com/typst/typst/blob/main/docs/Cargo.toml#L2).
8
+
9
+
## Required toolchains
10
+
11
+
-[Node.js](https://nodejs.org/)
12
+
-[Bun](https://bun.sh/)
13
+
14
+
Using [mise](https://mise.jdx.dev/) is recommended, as it enables central management of all the toolchains required for both the SSG and the upstream typst-docs.
15
+
16
+
```toml
17
+
# mise.toml
18
+
[tools]
19
+
rust = "1.83.0"# set required version for typst-docs
20
+
node = "22.11.0"
21
+
bun = "1.2.21"
22
+
```
23
+
24
+
## Setup
2
25
3
26
> [!NOTE]
4
-
> このドキュメントは執筆中です。
27
+
> The JSON structure generated by typst-docs is not stable and may change at any time. This project is confirmed to be compatible with typst-docs [v0.13.1](https://github.com/typst/typst/tree/v0.13.1). Other versions are usually compatible as well, but they have not been tested carefully.
28
+
29
+
The typst-docs CLI outputs the static files required for building the documentation. Place the JSON file and assets generated by typst-docs in the `/public/` directory. In most use cases, symbolic links are convenient.
30
+
31
+
```sh
32
+
# Run in the root directory of typst/typst repository
Create `/public/metadata.json` and describe the metadata for the documentation website. For details on each property, refer to the JSON schema. For example:
`/public/translation-status.json` is used to manage the translation progress and the classification of original content. This file is automatically updated when running the SSG, so manual editing is not necessary.
5
61
6
62
## Commands
7
63
64
+
After installing dependencies with Bun, the following commands are available:
65
+
66
+
```sh
67
+
bun install --frozen-lockfile
68
+
```
69
+
8
70
### Develop
9
71
10
72
> [!NOTE]
11
-
> 全文検索のインデックスは[pagefind](https://pagefind.app/)で生成していますが、インデックスの出力先が`dist/`になっているため、現在は開発サーバーで全文検索が機能しません。検索機能関連の開発をする場合は、`bun run build`を実行してから、`bun run preview`でビルド後の状態を確認してください。
73
+
> The full-text search index is generated by [pagefind](https://pagefind.app/), but since the output directory is set to `/dist/`, full-text search functionality is currently unavailable in the development server. For developing search-related features, please execute `bun run build` first, then use `bun run preview` to inspect the built output.
12
74
13
75
```sh
14
76
bun run dev
@@ -29,10 +91,10 @@ bun run preview
29
91
### Check
30
92
31
93
```sh
32
-
#コードスタイルをチェックする
94
+
#Check code style
33
95
bun run check
34
96
35
-
#自動修正を行う
97
+
#Apply automatic code fixes
36
98
bun run check:write
37
99
```
38
100
@@ -41,3 +103,13 @@ bun run check:write
41
103
```sh
42
104
bun run test
43
105
```
106
+
107
+
## Maintainers
108
+
109
+
-[@3w36zj6](https://github.com/3w36zj6)
110
+
111
+
## License
112
+
113
+
This project is derived from [typst/typst](https://github.com/typst/typst) and is licensed under the Apache-2.0 license.
114
+
115
+
Non-OSS assets distributed by the Typst web app are not included in this project.
0 commit comments