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
25 changes: 25 additions & 0 deletions docs/lunaria.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "./node_modules/@lunariajs/core/config.schema.json",
"repository": {
"name": "vuejs/vitepress",
"rootDir": "docs"
},
"files": [
{
"location": "**/*.md",
"pattern": "@lang/@path",
"type": "universal"
}
],
"defaultLocale": {
"label": "English",
"lang": "en"
},
"locales": [
{
"label": "简体中文",
"lang": "zh"
}
],
"outDir": ".vitepress/dist/_translations"
}
6 changes: 5 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
"scripts": {
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview"
"preview": "vitepress preview",
"lunaria:build": "lunaria build",
"lunaria:open": "open-cli .vitepress/dist/_translations/index.html"
},
"devDependencies": {
"@lunariajs/core": "^0.0.25",
"markdown-it-mathjax3": "^4.3.2",
"open-cli": "^8.0.0",
"vitepress": "workspace:*"
}
}
5 changes: 4 additions & 1 deletion docs/public/_headers
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/assets/*
cache-control: max-age=31536000
cache-control: immutable
cache-control: immutable

/_translations/*
x-robots-tag: noindex
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build.environment]
NODE_VERSION = "18"
NODE_VERSION = "20"

[build]
publish = "docs/.vitepress/dist"
command = "pnpm docs:build"
command = "pnpm docs:build && pnpm docs:lunaria:build"
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
"docs:build": "run-s build docs:build:only",
"docs:build:only": "pnpm -F=docs build",
"docs:preview": "pnpm -F=docs preview",
"docs:lunaria:build": "pnpm -F=docs lunaria:build",
"docs:lunaria:open": "pnpm -F=docs lunaria:open",
"format": "prettier --check --write .",
"format:fail": "prettier --check .",
"check": "run-s format:fail build test",
Expand Down
Loading