diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index e8d8de3a3..94766bddd 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -15,6 +15,8 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + submodules: recursive - uses: jdx/mise-action@13abe502c30c1559a5c37dff303831bab82c9402 # v2.2.3 - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8 - run: mise run generate-docs @@ -35,6 +37,8 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + submodules: recursive - name: Setup tools uses: jdx/mise-action@13abe502c30c1559a5c37dff303831bab82c9402 # v2.2.3 - name: Install dependencies @@ -48,6 +52,8 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + submodules: recursive - name: Download build artifacts uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: @@ -58,28 +64,3 @@ jobs: run: bun install --frozen-lockfile - name: Lint HTML using textlint run: bun run --bun textlint-html - - website-ci: - runs-on: ubuntu-24.04 - defaults: - run: - working-directory: website/typst-docs-web - strategy: - fail-fast: false - matrix: - include: - - task: biome - name: "Run Biome CI" - command: "bun biome ci ." - - task: vitest - name: "Run test runner" - command: "bun run test" - steps: - - name: Checkout the repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Setup tools - uses: jdx/mise-action@13abe502c30c1559a5c37dff303831bab82c9402 # v2.2.3 - - name: Install dependencies - run: bun install --frozen-lockfile - - name: ${{ matrix.name }} - run: ${{ matrix.command }} diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..a92a70a59 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "website/typst-docs-web"] + path = website/typst-docs-web + url = ../../typst-community/typst-docs-web.git diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3b394f3bc..407285d4c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Typst日本語ドキュメント翻訳プロジェクトにご興味をお持ち > [!WARNING] > ここに記載されている内容は改訂中です。現在の手順は最新の[Pull Request](https://github.com/typst-jp/docs/pulls?q=sort%3Aupdated-desc+is%3Apr+is%3Aopen)を参照してください。 -1. このGitHubリポジトリをフォークします。 +1. このGitHubリポジトリをフォークします。Git submoduleを含むため、リポジトリを`git clone`する際に`--recursive`オプションを付けてください。 2. ドキュメントの実体は、主にMarkdownファイルおよびコンパイラのソースコード内のコメントの2種類から構成されています。それぞれ、下記の注意書きに従って翻訳作業をお願いします。 - `./crates/typst-library/src/`内の`.rs`ファイル群は、Typstのコンパイラのソースコードです。ソースコード内に含まれている、**既存のコメントを直接書き換えて翻訳してください**。 - 例1:[Reference > Foundations](https://typst.app/docs/reference/foundations/)を翻訳する際は、`./crates/typst-library/src/foundations/mod.rs`のコメントを編集してください。 diff --git a/website/README.md b/website/README.md new file mode 100644 index 000000000..680b6b27b --- /dev/null +++ b/website/README.md @@ -0,0 +1,15 @@ +# website metadata + +このディレクトリでは、ドキュメントのWebサイトの構築に必要なメタデータを管理しています。 + +また、SSG(静的サイトジェネレーター)の本体は、Git submoduleとして別リポジトリの[typst-docs-web](https://github.com/typst-community/typst-docs-web)で管理されています。 + +## Git submoduleの初期化について + +リポジトリを`git clone`する際に`--recursive`オプションを付けていない場合は、以下のコマンドでsubmoduleを初期化・更新できます。 + +```sh +git submodule update --init --recursive +``` + +これにより、`typst-docs-web`ディレクトリが正しく取得されます。 diff --git a/website/typst-docs-web b/website/typst-docs-web new file mode 160000 index 000000000..ddbabe054 --- /dev/null +++ b/website/typst-docs-web @@ -0,0 +1 @@ +Subproject commit ddbabe054cdd570cb4c6769b4e4df3017c3b83af diff --git a/website/typst-docs-web/.editorconfig b/website/typst-docs-web/.editorconfig deleted file mode 100644 index 9f34e78d1..000000000 --- a/website/typst-docs-web/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# https://editorconfig.org -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = tab -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -max_line_length = 0 diff --git a/website/typst-docs-web/.env.example b/website/typst-docs-web/.env.example deleted file mode 100644 index 089a2d5e3..000000000 --- a/website/typst-docs-web/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -# Whether Vite should listen on all addresses for development. -VITE_LISTEN_ALL_ADDRESSES=true diff --git a/website/typst-docs-web/.gitignore b/website/typst-docs-web/.gitignore deleted file mode 100644 index 8a9d307fe..000000000 --- a/website/typst-docs-web/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -node_modules/ -dist/ -public/assets -public/docs.json -public/favicon.png -public/metadata.json -public/translation-status.json diff --git a/website/typst-docs-web/README.md b/website/typst-docs-web/README.md deleted file mode 100644 index fcffd0585..000000000 --- a/website/typst-docs-web/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# typst-docs-web - -
{content.name}
-
- {content.element &&
- {method.name}
-
-
-
- {method.element && {method.name}
- {method.name}
- {param.name}
- {string.string}
-
-
-
Search is disabled in the development environment.
- )} - -