mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.Docs.git
synced 2025-11-19 21:16:31 +08:00
20
.github/workflows/deploy-docs.yml
vendored
20
.github/workflows/deploy-docs.yml
vendored
@@ -1,11 +1,9 @@
|
||||
|
||||
name: Deploy Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
# make sure this is the branch you are using
|
||||
- 'main'
|
||||
- "main"
|
||||
|
||||
jobs:
|
||||
deploy-gh-pages:
|
||||
@@ -15,25 +13,26 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# if your docs needs submodules, uncomment the following line
|
||||
# submodules: true
|
||||
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
run_install: true
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: npm
|
||||
node-version: 18
|
||||
cache: pnpm
|
||||
|
||||
- name: Install Deps
|
||||
run: npm install
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Docs
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
run: |-
|
||||
npm run docs:build
|
||||
pnpm run docs:build
|
||||
> dist/.nojekyll
|
||||
|
||||
- name: Deploy Docs
|
||||
@@ -42,4 +41,3 @@ jobs:
|
||||
# This is the branch where the docs are deployed to
|
||||
branch: gh-pages
|
||||
folder: dist
|
||||
|
||||
|
||||
@@ -1,22 +1,35 @@
|
||||
import { viteBundler } from "@vuepress/bundler-vite";
|
||||
import { docsearchPlugin } from "@vuepress/plugin-docsearch";
|
||||
import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics";
|
||||
import { defineUserConfig } from "vuepress";
|
||||
import { viteBundler } from '@vuepress/bundler-vite'
|
||||
import theme from "./theme.js";
|
||||
import { autoCatalogPlugin } from "vuepress-plugin-auto-catalog";
|
||||
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
|
||||
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
|
||||
import { redirectPlugin } from "vuepress-plugin-redirect";
|
||||
|
||||
import theme from "./theme.js";
|
||||
|
||||
export default defineUserConfig({
|
||||
base: "/",
|
||||
|
||||
dest: "./dist",
|
||||
|
||||
head: [
|
||||
['script', {async:"", defer:"", "data-website-id":"f586534f-1741-450e-a0f4-3c0189f993c9",
|
||||
src:"https://umami.irain.in/umami.js"}, `
|
||||
`],
|
||||
['script', {type: "module", src:"https://get.microsoft.com/badge/ms-store-badge.bundled.js"}],
|
||||
[
|
||||
"script",
|
||||
{
|
||||
src: "https://umami.irain.in/umami.js",
|
||||
"data-website-id": "f586534f-1741-450e-a0f4-3c0189f993c9",
|
||||
async: "",
|
||||
defer: "",
|
||||
},
|
||||
],
|
||||
[
|
||||
"script",
|
||||
{
|
||||
type: "module",
|
||||
src: "https://get.microsoft.com/badge/ms-store-badge.bundled.js",
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
locales: {
|
||||
"/zh/": {
|
||||
lang: "zh-CN",
|
||||
@@ -75,30 +88,29 @@ export default defineUserConfig({
|
||||
reportMissingResultsLinkText: "点击反馈",
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
"/en/": {
|
||||
placeholder: "Search documents",
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: "Search documents"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
buttonText: "Search documents",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
googleAnalyticsPlugin({
|
||||
id: "G-F3LFJCE3RM"
|
||||
id: "G-F3LFJCE3RM",
|
||||
}),
|
||||
redirectPlugin({
|
||||
defaultLocale: "/en/",
|
||||
defaultBehavior: "defaultLocale",
|
||||
autoLocale: true,
|
||||
switchLocale: "modal",
|
||||
localeConfig: {
|
||||
"/en/": ["en-US", "en-UK", "en"],
|
||||
"/zh/": ["zh-CN", "zh-TW", "zh"],
|
||||
}
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
||||
@@ -109,9 +121,8 @@ export default defineUserConfig({
|
||||
bundler: viteBundler({
|
||||
viteOptions: {
|
||||
build: {
|
||||
chunkSizeWarningLimit: 1500
|
||||
}
|
||||
chunkSizeWarningLimit: 1500,
|
||||
},
|
||||
},
|
||||
vuePluginOptions: {},
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -60,90 +60,46 @@ export default hopeTheme({
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
plugins: {
|
||||
// If you don't need comment feature, you can remove following option
|
||||
// The following config is for demo ONLY, if you need comment feature, please generate and use your own config, see comment plugin documentation for details.
|
||||
// To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
|
||||
comment: {
|
||||
provider: "Waline",
|
||||
serverURL: "https://comments.snapgenshin.com",
|
||||
emoji: [
|
||||
'//unpkg.com/@waline/emojis@1.1.0/weibo',
|
||||
'//unpkg.com/@waline/emojis@1.1.0/bilibili',
|
||||
'//unpkg.com/@waline/emojis@1.1.0/bmoji',
|
||||
'//unpkg.com/@waline/emojis@1.1.0/qq',
|
||||
'//unpkg.com/@waline/emojis@1.1.0/tieba'
|
||||
"//unpkg.com/@waline/emojis@1.1.0/weibo",
|
||||
"//unpkg.com/@waline/emojis@1.1.0/bilibili",
|
||||
"//unpkg.com/@waline/emojis@1.1.0/bmoji",
|
||||
"//unpkg.com/@waline/emojis@1.1.0/qq",
|
||||
"//unpkg.com/@waline/emojis@1.1.0/tieba",
|
||||
],
|
||||
dark: "auto",
|
||||
requiredMeta: ['mail'],
|
||||
login: 'enable',
|
||||
requiredMeta: ["mail"],
|
||||
reaction: false,
|
||||
},
|
||||
|
||||
// Operational Plugins
|
||||
components: {
|
||||
components: ["Badge", "BiliBili"],
|
||||
},
|
||||
|
||||
feed: {
|
||||
rss: true,
|
||||
},
|
||||
seo: true,
|
||||
|
||||
sitemap: {
|
||||
changefreq: "weekly"
|
||||
changefreq: "weekly",
|
||||
},
|
||||
|
||||
// Disable features you don't want here
|
||||
mdEnhance: {
|
||||
align: true,
|
||||
attrs: true,
|
||||
chart: true,
|
||||
codetabs: true,
|
||||
container: true,
|
||||
demo: true,
|
||||
echarts: true,
|
||||
flowchart: true,
|
||||
gfm: true,
|
||||
imgSize: true,
|
||||
include: true,
|
||||
katex: true,
|
||||
imgLazyload: true,
|
||||
mark: true,
|
||||
mermaid: true,
|
||||
playground: {
|
||||
presets: ["ts", "vue"],
|
||||
},
|
||||
presentation: {
|
||||
plugins: ["highlight", "math", "search", "notes", "zoom"],
|
||||
},
|
||||
stylize: [
|
||||
{
|
||||
matcher: "Recommanded",
|
||||
replacer: ({ tag }) => {
|
||||
if (tag === "em")
|
||||
return {
|
||||
tag: "Badge",
|
||||
attrs: { type: "tip" },
|
||||
content: "Recommanded",
|
||||
};
|
||||
},
|
||||
},
|
||||
],
|
||||
sub: true,
|
||||
sup: true,
|
||||
include: true,
|
||||
tabs: true,
|
||||
vPre: true,
|
||||
vuePlayground: true,
|
||||
},
|
||||
components: {
|
||||
components: [
|
||||
"Badge",
|
||||
"BiliBili",
|
||||
]
|
||||
},
|
||||
|
||||
pwa: {
|
||||
favicon: "/favicon.ico",
|
||||
cacheHTML: false,
|
||||
cachePic: true,
|
||||
appendBase: true,
|
||||
themeColor: '#f26d6d',
|
||||
themeColor: "#f26d6d",
|
||||
update: "hint",
|
||||
apple: {
|
||||
icon: "/favicon.ico",
|
||||
@@ -185,7 +141,7 @@ export default hopeTheme({
|
||||
sizes: "48x48",
|
||||
type: "image/png",
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
9939
package-lock.json
generated
9939
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@@ -11,11 +11,19 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vuepress/client": "2.0.0-beta.61",
|
||||
"@vuepress/bundler-vite": "2.0.0-beta.61",
|
||||
"@vuepress/plugin-docsearch": "2.0.0-beta.61",
|
||||
"@vuepress/plugin-google-analytics": "2.0.0-beta.61",
|
||||
"vue": "^3.2.47",
|
||||
"vuepress": "2.0.0-beta.61",
|
||||
"vuepress-plugin-redirect": "2.0.0-beta.202",
|
||||
"vuepress-theme-hope": "2.0.0-beta.202"
|
||||
"vuepress-plugin-redirect": "2.0.0-beta.206",
|
||||
"vuepress-theme-hope": "2.0.0-beta.206"
|
||||
},
|
||||
"pnpm": {
|
||||
"ignoreMissing": [
|
||||
"@algolia/client-search",
|
||||
"react",
|
||||
"react-dom"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
6375
pnpm-lock.yaml
generated
Normal file
6375
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user