mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-01 01:10:34 +08:00
build(docs): update and switch to esm (#14642)
* build(docs): switch to esm * build(docs): bump pnpm to v10.20.0 * ci: 精简文档站构建和发布流程 * build(docs): 升级部分依赖 * ci: 补全package.json的查找路径 * build(docs): 升级plume主题 * fix(docs): 适应新版本主题的样式变动 * ci: 补全文档站工作流的权限设置
This commit is contained in:
23
.github/workflows/website-workflow.yml
vendored
23
.github/workflows/website-workflow.yml
vendored
@@ -24,9 +24,13 @@ concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
# required for peaceiris/actions-gh-pages
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and Deploy Documentation Site
|
||||
name: Build and Deploy
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
@@ -35,34 +39,31 @@ jobs:
|
||||
with:
|
||||
show-progress: false
|
||||
|
||||
- name: Setup Pages
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
package_json_file: "./docs/package.json"
|
||||
run_install: false
|
||||
|
||||
- name: Setup Node.js environment
|
||||
- name: Setup node.js environment
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
cache: pnpm
|
||||
cache-dependency-path: "./docs/pnpm-lock.yaml"
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install node modules
|
||||
run: pnpm install --frozen-lockfile
|
||||
working-directory: "./docs"
|
||||
|
||||
- name: Build documentation site
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
working-directory: "./docs"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v4
|
||||
- name: Upload artifact to GitHub
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: "./docs/.vuepress/dist"
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineClientConfig } from 'vuepress/client'
|
||||
|
||||
import { getAsciiArt } from './plugins/asciiArt.mts'
|
||||
import { getAsciiArt } from './plugins/asciiArt'
|
||||
|
||||
import AsciiArt from './components/AsciiArt.vue'
|
||||
import ImageGrid from './components/ImageGrid.vue'
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
||||
import { getAsciiArt, ThemeType, AsciiArtScope } from '../plugins/asciiArt.mts'
|
||||
import { getAsciiArt, ThemeType, AsciiArtScope } from '../plugins/asciiArt'
|
||||
|
||||
// -------- Props --------
|
||||
interface AsciiArtProps {
|
||||
|
||||
7
docs/.vuepress/env.d.ts
vendored
7
docs/.vuepress/env.d.ts
vendored
@@ -1,7 +0,0 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare module '*.vue' {
|
||||
import { DefineComponent } from 'vue'
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.container {
|
||||
.doc-hero-container {
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -37,4 +37,24 @@
|
||||
font-size: var(--vp-home-hero-name-font-size) !important;
|
||||
line-height: var(--vp-home-hero-name-line-height) !important;
|
||||
}
|
||||
|
||||
/* 首页标题 */
|
||||
.name.clip {
|
||||
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
/* 按钮组容器 */
|
||||
.actions .action {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 按钮 */
|
||||
.actions .action .vp-button {
|
||||
margin: 0.5rem;
|
||||
min-width: 7em;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,2 @@
|
||||
@use "home.scss";
|
||||
@use "fonts.scss";
|
||||
|
||||
/* 按钮组容器 */
|
||||
.actions .action {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 按钮 */
|
||||
.actions .action .vp-button {
|
||||
margin: 0.5rem;
|
||||
min-width: 7em;
|
||||
}
|
||||
|
||||
/* 首页标题 */
|
||||
.is-home .name.clip {
|
||||
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
pageLayout: home
|
||||
home: true
|
||||
navbar: false
|
||||
config:
|
||||
- type: custom
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
pageLayout: home
|
||||
home: true
|
||||
title: 首页
|
||||
config:
|
||||
- type: doc-hero
|
||||
|
||||
@@ -2,35 +2,35 @@
|
||||
"name": "docs",
|
||||
"version": "2.0.0",
|
||||
"description": "manual for MaaAssistantArknights",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"repository": "https://github.com/MaaAssistantArknights/MaaAssistantArknights",
|
||||
"author": "bakashigure <me@shigure.fun>",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.18.2",
|
||||
"scripts": {
|
||||
"dev": "vuepress dev .",
|
||||
"build": "vuepress build .",
|
||||
"clean": "vuepress dev . --clean-cache"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/vue": "^5.0.0",
|
||||
"@vuepress/bundler-vite": "2.0.0-rc.24",
|
||||
"@vuepress/helper": "2.0.0-rc.112",
|
||||
"@vuepress/plugin-docsearch": "2.0.0-rc.112",
|
||||
"@vuepress/plugin-git": "2.0.0-rc.112",
|
||||
"@vuepress/plugin-google-analytics": "2.0.0-rc.112",
|
||||
"@vuepress/bundler-vite": "2.0.0-rc.26",
|
||||
"@vuepress/helper": "2.0.0-rc.118",
|
||||
"@vuepress/plugin-docsearch": "2.0.0-rc.118",
|
||||
"@vuepress/plugin-git": "2.0.0-rc.118",
|
||||
"@vuepress/plugin-google-analytics": "2.0.0-rc.118",
|
||||
"@vueuse/core": "^13.9.0",
|
||||
"bcrypt-ts": "^7.1.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"markdown-it": "^14.1.0",
|
||||
"markdown-it-anchor": "^9.2.0",
|
||||
"prettier": "^3.6.2",
|
||||
"sass-embedded": "^1.93.2",
|
||||
"sass-embedded": "^1.93.3",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^7.1.9",
|
||||
"vue": "^3.5.22",
|
||||
"vuepress": "2.0.0-rc.24",
|
||||
"vuepress-theme-plume": "1.0.0-rc.169"
|
||||
"vite": "^7.2.0",
|
||||
"vue": "^3.5.23",
|
||||
"vuepress": "2.0.0-rc.26",
|
||||
"vuepress-theme-plume": "1.0.0-rc.175"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vuepress dev .",
|
||||
"build": "vuepress build .",
|
||||
"clean": "vuepress dev . --clean-cache"
|
||||
}
|
||||
"packageManager": "pnpm@10.20.0"
|
||||
}
|
||||
|
||||
2742
docs/pnpm-lock.yaml
generated
2742
docs/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"module": "ESNext",
|
||||
"target": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"types": ["vite/client"],
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"allowImportingTsExtensions": true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user