Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist
path: website/dist
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist # The folder the action should deploy.
folder: website/dist # The folder the action should deploy.

textlint-md:
runs-on: ubuntu-24.04
Expand All @@ -57,7 +57,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: dist
path: website/dist
- uses: jdx/mise-action@v2
- name: Install dependencies
run: bun install --frozen-lockfile
Expand Down
21 changes: 19 additions & 2 deletions .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,35 @@ _.python.venv = { path = ".venv", create = true }

[settings]
yes = true
idiomatic_version_file_enable_tools = []

[tasks.generate-docs]
run = "cargo test --package typst-docs --lib -- tests::test_docs --exact --nocapture"

[tasks.generate-web]
run = "uv run gen.py"
depends = ["install-website"]
run = [
"bun install --frozen-lockfile",
"bun run build",
]
dir = "./website"

[tasks.generate]
run = [
"mise run generate-docs",
"mise run generate-web"
]

[tasks.install-website]
run = "bun install --frozen-lockfile"
dir = "./website"

[tasks.dev]
depends = ["install-website"]
run = "bun run dev"
dir = "./website"

[tasks.preview]
run = "uv run -m http.server -d dist"
depends = ["install-website"]
run = "bun run preview"
dir = "./website"
4 changes: 2 additions & 2 deletions .textlintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# hayagrivaのsrc/csl/archive.rsで管理されている参考文献フォーマット
dist/docs/reference/model/bibliography/index.html
dist/docs/reference/model/cite/index.html
website/dist/docs/reference/model/bibliography/index.html
website/dist/docs/reference/model/cite/index.html
16 changes: 3 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mise run preview
#### miseによる開発環境のセットアップ

> [!NOTE]
> 以下の内容はmise v2024.11.5に基づいています。内容の不備を発見した場合は、Issueを立ててください。
> 以下の内容はmise v2025.5.6に基づいています。内容の不備を発見した場合は、Issueを立ててください。

miseが導入されている環境で初めて当プロジェクトのルートディレクトリに移動すると、以下のように構成ファイルを信頼することを求められます。

Expand All @@ -83,16 +83,6 @@ mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information
mise trust
```

miseの設定ファイルでPythonのvirtualenvの自動アクティベートを有効にしていますが、この時点では`.venv/`ディレクトリが作成されていないため、WARNが発生するはずです。

```plaintext
mise trusted /path/to/typst-jp.github.io/.mise.toml
mise WARN no venv found at: /path/to/typst-jp.github.io/.venv

To create a virtualenv manually, run:
python -m venv /path/to/typst-jp.github.io/.venv
```

次に、`mise install`を実行して、miseで管理されているツールをインストールおよびアクティベートします。

```sh
Expand All @@ -111,9 +101,9 @@ mise run generate-docs

#### ドキュメントデータのJSONファイルからWebサイトを生成する

Webサイトの生成にはPythonとJinja2を使用しています。また、パッケージ管理にuvを使用しています
Webサイトの生成にはNode.jsとViteとHonoを使用しています。また、パッケージ管理にBunを使用しています

`mise run generate-web`を実行すると、`assets/docs.json`を基にWebサイトのデータが`dist/`に生成されます。
`mise run generate-web`を実行すると、`assets/docs.json`を基にWebサイトのデータが`website/dist/`に生成されます。

```sh
mise run generate-web
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"textlint-md": "textlint ./docs/",
"textlint-md:fix": "textlint --fix ./docs/",
"textlint-html": "textlint ./dist/docs/"
"textlint-html": "textlint ./website/dist/docs/"
},
"devDependencies": {
"@types/bun": "latest",
Expand Down
Loading