-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit dfdd655
Showing
37 changed files
with
7,116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: docs | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: true | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
|
||
- name: Build VuePress site | ||
run: pnpm docs:build | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: '.vuepress/dist' | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.idea/ | ||
node_modules/ | ||
/.vuepress/.cache/ | ||
/.vuepress/.temp/ | ||
/.vuepress/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { defineUserConfig } from "vuepress"; | ||
import theme from "./theme.js"; | ||
import plugins from "./plugins.js"; | ||
|
||
export default defineUserConfig({ | ||
base: "/", | ||
|
||
locales: { | ||
"/": { | ||
lang: "zh-CN", | ||
title: "华工生存手册", | ||
}, | ||
"/zh-Hant/": { | ||
lang: "zh-TW", | ||
title: "華工生存手冊", | ||
}, | ||
"/en/": { | ||
lang: "en-US", | ||
title: "Survive in SCUT", | ||
}, | ||
}, | ||
|
||
theme, | ||
|
||
plugins, | ||
|
||
shouldPrefetch: false, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { searchProPlugin } from "vuepress-plugin-search-pro"; | ||
|
||
export default [ | ||
searchProPlugin({ | ||
searchMaxSuggestions: 10, | ||
indexContent: true, | ||
customFields: [ | ||
{ | ||
getter: (page) => page.frontmatter.category, | ||
formatter: "分类:$content", | ||
}, | ||
{ | ||
getter: (page) => page.frontmatter.tag, | ||
formatter: "标签:$content", | ||
}, | ||
], | ||
}) | ||
] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { sidebar } from "vuepress-theme-hope"; | ||
|
||
export const enSidebar = sidebar({ | ||
"/en/": [ | ||
{ | ||
prefix: "docs/", | ||
link: "docs/", | ||
children: [ | ||
"", | ||
{ | ||
text: "Aspiration", | ||
prefix: "ambition/", | ||
link: "ambition/", | ||
icon: "activity", | ||
children: "structure" | ||
}, | ||
{ | ||
text: "Newbee!!!", | ||
prefix: "newbee/", | ||
link: "newbee/", | ||
icon: "launch", | ||
children: "structure" | ||
}, | ||
{ | ||
text: "About", | ||
prefix: "about/", | ||
link: "about/", | ||
icon: "info", | ||
children: "structure" | ||
} | ||
], | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./en.js"; | ||
export * from "./zh.js"; | ||
export * from "./zhHant.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { sidebar } from "vuepress-theme-hope"; | ||
|
||
export const zhSidebar = sidebar({ | ||
"/": [ | ||
{ | ||
prefix: "docs/", | ||
link: "docs/", | ||
children: [ | ||
"", | ||
{ | ||
text: "立志篇", | ||
prefix: "ambition/", | ||
link: "ambition/", | ||
icon: "activity", | ||
children: "structure" | ||
}, | ||
{ | ||
text: "致新生", | ||
prefix: "newbee/", | ||
link: "newbee/", | ||
icon: "launch", | ||
children: "structure" | ||
}, | ||
{ | ||
text: "关于", | ||
prefix: "about/", | ||
link: "about/", | ||
icon: "info", | ||
children: "structure" | ||
} | ||
], | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { sidebar } from "vuepress-theme-hope"; | ||
|
||
export const zhHantSidebar = sidebar({ | ||
"/zh-Hant/": [ | ||
{ | ||
prefix: "docs/", | ||
link: "docs/", | ||
children: [ | ||
"", | ||
{ | ||
text: "立志篇", | ||
prefix: "ambition/", | ||
link: "ambition/", | ||
icon: "activity", | ||
children: "structure" | ||
}, | ||
{ | ||
text: "致新生", | ||
prefix: "newbee/", | ||
link: "newbee/", | ||
icon: "launch", | ||
children: "structure" | ||
}, | ||
{ | ||
text: "關於", | ||
prefix: "about/", | ||
link: "about/", | ||
icon: "info", | ||
children: "structure" | ||
} | ||
], | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// you can change config here | ||
$colors: #c0392b, #d35400, #f39c12, #27ae60, #16a085, #2980b9, #8e44ad, #2c3e50, | ||
#7f8c8d !default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// place your custom styles here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// you can change colors here | ||
$theme-color: #0AA7A0; | ||
$bg-color: ( | ||
light: #EBEDF0, | ||
dark: #19191A, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
import { hopeTheme } from "vuepress-theme-hope"; | ||
import { enSidebar, zhSidebar, zhHantSidebar } from "./sidebar"; | ||
|
||
export default hopeTheme({ | ||
hostname: "https://scut.life", | ||
|
||
iconAssets: "iconfont", | ||
|
||
logo: "/logo.png", | ||
|
||
repo: "scutrobotlab/Survive-in-SCUT", | ||
|
||
docsDir: "src", | ||
|
||
navbarAutoHide: "always", | ||
|
||
navbarLayout: { | ||
start: ["Brand", "Search"], | ||
end: ["Language", "Outlook", "Repo"] | ||
}, | ||
|
||
locales: { | ||
"/": { | ||
sidebar: zhSidebar, | ||
|
||
displayFooter: false, | ||
}, | ||
|
||
"/en/": { | ||
sidebar: enSidebar, | ||
|
||
displayFooter: false, | ||
}, | ||
|
||
"/zh-Hant/": { | ||
sidebar: zhHantSidebar, | ||
|
||
displayFooter: false | ||
} | ||
}, | ||
|
||
plugins: { | ||
// You should generate and use your own comment service | ||
comment: { | ||
provider: "Giscus", | ||
repo: "vuepress-theme-hope/giscus-discussions", | ||
repoId: "R_kgDOKgXN2w", | ||
category: "Announcements", | ||
categoryId: "DIC_kwDOKgXN284CaI5d", | ||
}, | ||
|
||
// All features are enabled for demo, only preserve features you need here | ||
mdEnhance: { | ||
align: true, | ||
attrs: true, | ||
chart: true, | ||
codetabs: true, | ||
demo: true, | ||
echarts: true, | ||
figure: true, | ||
flowchart: true, | ||
gfm: true, | ||
imgLazyload: true, | ||
imgSize: true, | ||
include: true, | ||
katex: true, | ||
mark: true, | ||
mermaid: true, | ||
playground: { | ||
presets: ["ts", "vue"], | ||
}, | ||
revealjs: { | ||
plugins: ["highlight", "math", "search", "notes", "zoom"], | ||
}, | ||
stylize: [ | ||
{ | ||
matcher: "Recommended", | ||
replacer: ({ tag }) => { | ||
if (tag === "em") | ||
return { | ||
tag: "Badge", | ||
attrs: { type: "tip" }, | ||
content: "Recommended", | ||
}; | ||
}, | ||
}, | ||
], | ||
sub: true, | ||
sup: true, | ||
tabs: true, | ||
vPre: true, | ||
vuePlayground: true, | ||
}, | ||
|
||
pwa: { | ||
favicon: "/favicon.ico", | ||
cacheHTML: true, | ||
cachePic: true, | ||
appendBase: true, | ||
manifest: { | ||
shortcuts: [ | ||
{ | ||
name: "华工生存手册", | ||
short_name: "scut.life", | ||
url: "/docs/", | ||
icons: [ | ||
{ | ||
src: "/assets/icon/guide-maskable.png", | ||
sizes: "192x192", | ||
purpose: "maskable", | ||
type: "image/png", | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
home: true | ||
icon: home | ||
title : "主页" | ||
heroImage: /logo.png | ||
heroFullScreen: true | ||
heroText: 华工生存手册 | ||
tagline: 下一站 五山 / 大学城南 | ||
actions: | ||
- text: "> 开始游戏 <" | ||
link: ./docs/ | ||
type: primary | ||
|
||
- text: 关于 | ||
link: ./about | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: 关于 | ||
icon: about | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: 华工生存手册 | ||
icon: home | ||
--- | ||
|
||
## 前言 | ||
![](/assets/image/genshin.jpg) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: 什么是华工生存手册 | ||
--- |
Oops, something went wrong.