Skip to content

Commit be042df

Browse files
authored
chore: move SSG root to subdirectory for repository separation (#307)
1 parent cf23238 commit be042df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+63
-36
lines changed

.github/workflows/website.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
2424
with:
2525
name: build-artifacts
26-
path: website/dist
26+
path: website/typst-docs-web/dist
2727
- name: Deploy
2828
if: github.ref == 'refs/heads/main'
2929
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4.7.3
3030
with:
31-
folder: website/dist # The folder the action should deploy.
31+
folder: website/typst-docs-web/dist # The folder the action should deploy.
3232

3333
textlint-md:
3434
runs-on: ubuntu-24.04
@@ -52,7 +52,7 @@ jobs:
5252
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
5353
with:
5454
name: build-artifacts
55-
path: website/dist
55+
path: website/typst-docs-web/dist
5656
- uses: jdx/mise-action@13abe502c30c1559a5c37dff303831bab82c9402 # v2.2.3
5757
- name: Install dependencies
5858
run: bun install --frozen-lockfile
@@ -63,7 +63,7 @@ jobs:
6363
runs-on: ubuntu-24.04
6464
defaults:
6565
run:
66-
working-directory: ./website
66+
working-directory: website/typst-docs-web
6767
strategy:
6868
fail-fast: false
6969
matrix:

.textlintignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# hayagrivaのsrc/csl/archive.rsで管理されている参考文献フォーマット
2-
website/dist/reference/model/bibliography/index.html
3-
website/dist/reference/model/cite/index.html
2+
website/typst-docs-web/dist/reference/model/bibliography/index.html
3+
website/typst-docs-web/dist/reference/model/cite/index.html

mise.toml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
[tools]
23
rust = "1.83.0"
34
node = "22.11.0"
@@ -11,13 +12,30 @@ idiomatic_version_file_enable_tools = []
1112
[vars]
1213
_.file = "website/metadata.json"
1314

15+
[tasks.symlink-docs-assets]
16+
run = [
17+
"rm -rf website/typst-docs-web/public/docs.json",
18+
"ln -s ../../../docs.json website/typst-docs-web/public/docs.json",
19+
"rm -rf website/typst-docs-web/public/assets",
20+
"ln -s ../../../assets website/typst-docs-web/public/assets"
21+
]
22+
23+
[tasks.symlink-web-metadata]
24+
run = [
25+
"rm -rf website/typst-docs-web/public/metadata.json",
26+
"ln -s ../../metadata.json website/typst-docs-web/public/metadata.json",
27+
"rm -rf website/typst-docs-web/public/translation-status.json",
28+
"ln -s ../../translation-status.json website/typst-docs-web/public/translation-status.json"
29+
]
30+
1431
[tasks.generate-docs]
32+
depends = ["symlink-docs-assets", "symlink-web-metadata"]
1533
run = "cargo run --package typst-docs -- --assets-dir assets --out-file docs.json --base {{vars.basePath}}"
1634

1735
[tasks.generate-web]
18-
depends = ["install-website"]
36+
depends = ["install-website", "symlink-docs-assets", "symlink-web-metadata"]
1937
run = ["bun run build"]
20-
dir = "./website"
38+
dir = "./website/typst-docs-web"
2139

2240
[tasks.generate]
2341
run = [
@@ -27,17 +45,17 @@ run = [
2745

2846
[tasks.install-website]
2947
run = "bun install --frozen-lockfile"
30-
dir = "./website"
48+
dir = "./website/typst-docs-web"
3149

3250
[tasks.dev]
3351
depends = ["install-website"]
3452
run = "bun run dev"
35-
dir = "./website"
53+
dir = "./website/typst-docs-web"
3654

3755
[tasks.preview]
3856
depends = ["install-website"]
3957
run = "bun run preview"
40-
dir = "./website"
58+
dir = "./website/typst-docs-web"
4159

4260
[tasks.install-textlint]
4361
run = "bun install --frozen-lockfile"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"textlint-md": "textlint ./docs/",
66
"textlint-md:fix": "textlint --fix ./docs/",
7-
"textlint-html": "textlint ./website/dist/"
7+
"textlint-html": "textlint ./website/typst-docs-web/dist/"
88
},
99
"devDependencies": {
1010
"@types/bun": "latest",

website/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

website/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "./metadata.schema.json",
2+
"$schema": "./typst-docs-web/metadata.schema.json",
33
"language": "ja-JP",
44
"version": "0.13.1",
55
"typstOfficialUrl": "https://typst.app",

website/translation-status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "./translation-status.schema.json",
2+
"$schema": "./typst-docs-web/translation-status.schema.json",
33
"/docs/": "translated",
44
"/docs/tutorial/": "translated",
55
"/docs/tutorial/writing-in-typst/": "translated",
File renamed without changes.
File renamed without changes.

website/typst-docs-web/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
dist/
3+
public/assets
4+
public/docs.json
5+
public/metadata.json
6+
public/translation-status.json

0 commit comments

Comments
 (0)