Skip to content

Commit 6eecfb3

Browse files
authored
chore: setup lunaria (#3444)
1 parent 78abf47 commit 6eecfb3

File tree

6 files changed

+829
-4
lines changed

6 files changed

+829
-4
lines changed

Diff for: docs/lunaria.config.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "./node_modules/@lunariajs/core/config.schema.json",
3+
"repository": {
4+
"name": "vuejs/vitepress",
5+
"rootDir": "docs"
6+
},
7+
"files": [
8+
{
9+
"location": "**/*.md",
10+
"pattern": "@lang/@path",
11+
"type": "universal"
12+
}
13+
],
14+
"defaultLocale": {
15+
"label": "English",
16+
"lang": "en"
17+
},
18+
"locales": [
19+
{
20+
"label": "简体中文",
21+
"lang": "zh"
22+
}
23+
],
24+
"outDir": ".vitepress/dist/_translations"
25+
}

Diff for: docs/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
"scripts": {
66
"dev": "vitepress dev",
77
"build": "vitepress build",
8-
"preview": "vitepress preview"
8+
"preview": "vitepress preview",
9+
"lunaria:build": "lunaria build",
10+
"lunaria:open": "open-cli .vitepress/dist/_translations/index.html"
911
},
1012
"devDependencies": {
13+
"@lunariajs/core": "^0.0.25",
1114
"markdown-it-mathjax3": "^4.3.2",
15+
"open-cli": "^8.0.0",
1216
"vitepress": "workspace:*"
1317
}
1418
}

Diff for: docs/public/_headers

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
/assets/*
22
cache-control: max-age=31536000
3-
cache-control: immutable
3+
cache-control: immutable
4+
5+
/_translations/*
6+
x-robots-tag: noindex

Diff for: netlify.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build.environment]
2-
NODE_VERSION = "18"
2+
NODE_VERSION = "20"
33

44
[build]
55
publish = "docs/.vitepress/dist"
6-
command = "pnpm docs:build"
6+
command = "pnpm docs:build && pnpm docs:lunaria:build"

Diff for: package.json

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@
8383
"docs:build": "run-s build docs:build:only",
8484
"docs:build:only": "pnpm -F=docs build",
8585
"docs:preview": "pnpm -F=docs preview",
86+
"docs:lunaria:build": "pnpm -F=docs lunaria:build",
87+
"docs:lunaria:open": "pnpm -F=docs lunaria:open",
8688
"format": "prettier --check --write .",
8789
"format:fail": "prettier --check .",
8890
"check": "run-s format:fail build test",

0 commit comments

Comments
 (0)