Skip to content

Commit a4c6ede

Browse files
committed
[i18n] Setup Lunaria i18n status tracker
1 parent de8a3cd commit a4c6ede

File tree

4 files changed

+128
-1
lines changed

4 files changed

+128
-1
lines changed

astro.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import react from "@astrojs/react";
1616
import starlightLlmsTxt from "starlight-llms-txt";
1717
import favicons from "astro-favicons";
1818
import icon from "astro-icon";
19+
import lunaria from "@lunariajs/starlight";
1920
import { sidebar } from "./astro.sidebar.ts";
2021
import { ENV } from "./src/lib/env";
2122
import { ogImagesIntegration } from "./src/integrations/ogImages";
@@ -106,6 +107,10 @@ export default defineConfig({
106107
demote: ["404"],
107108
exclude: ["404"],
108109
}),
110+
lunaria({
111+
sync: true,
112+
route: "/i18n-status",
113+
}),
109114
...(hasAlgoliaConfig
110115
? [
111116
starlightDocSearch({

lunaria.config.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$schema": "./node_modules/@lunariajs/core/config.schema.json",
3+
"repository": {
4+
"name": "aptos-labs/aptos-docs"
5+
},
6+
"files": [
7+
{
8+
"location": "src/content/docs/**/*.{md,mdx}",
9+
"pattern": "src/content/docs/@lang/@path",
10+
"type": "universal"
11+
}
12+
],
13+
"locales": [
14+
{
15+
"label": "简体中文",
16+
"lang": "zh"
17+
},
18+
{
19+
"label": "日本語",
20+
"lang": "ja"
21+
}
22+
],
23+
"defaultLocale": {
24+
"label": "English",
25+
"lang": "en"
26+
}
27+
}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"format:eslint": "pnpm run lint --fix",
2525
"format:prettier": "prettier . --write",
2626
"format:content": "remark \"src/content/**/*.mdx\" --output --use remark-mdx",
27-
"postinstall": "pnpm exec simple-git-hooks"
27+
"postinstall": "pnpm exec simple-git-hooks",
28+
"lunaria:build": "lunaria build",
29+
"lunaria:preview": "lunaria preview"
2830
},
2931
"engines": {
3032
"node": "22.x",
@@ -45,6 +47,8 @@
4547
"@expressive-code/plugin-collapsible-sections": "^0.40.2",
4648
"@graphiql/toolkit": "^0.11.1",
4749
"@iconify/json": "^2.2.324",
50+
"@lunariajs/core": "^0.1.1",
51+
"@lunariajs/starlight": "^0.1.1",
4852
"@nanostores/react": "^0.8.4",
4953
"@octokit/graphql": "^8.2.1",
5054
"@readme/openapi-parser": "^2.7.0",

pnpm-lock.yaml

Lines changed: 91 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)