This repository has been archived by the owner on Aug 5, 2024. It is now read-only.
-
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.
Description: Log:
- Loading branch information
Showing
14 changed files
with
419 additions
and
17 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,25 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- run: cd docs/;bash docs_env.sh | ||
|
||
- name: Build | ||
run: export VITE_BASE="/youqu/";pnpm run build | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/.vitepress/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
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,90 @@ | ||
import {defineConfig} from 'vitepress' | ||
import {withMermaid} from "vitepress-plugin-mermaid"; | ||
import timeline from "vitepress-markdown-timeline"; | ||
import {version} from "../../package.json" | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default withMermaid( | ||
defineConfig({ | ||
base: process.env.VITE_BASE, | ||
lang: 'zh-CN', | ||
title: "YouQu3 | 下一代Linux自动化测试框架", | ||
description: "使用简单且功能强大的自动化测试框架", | ||
head: [ | ||
['meta', {name: 'referrer', content: 'no-referrer-when-downgrade'}], | ||
['link', {rel: 'icon', href: `${process.env.VITE_BASE || '/'}favicon.ico`}], | ||
], | ||
vite: { | ||
publicDir: "assets", | ||
}, | ||
markdown: { | ||
config: (md) => { | ||
md.use(timeline) | ||
} | ||
}, | ||
|
||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
siteTitle: "YouQu3", | ||
nav: [ | ||
{text: '首页', link: '/index'}, | ||
{text: '设计', link: '/设计/YouQu3架构设计规划'}, | ||
{ | ||
text: '插件', items: [ | ||
{text: "日志系统 | funnylog", link: "https://linuxdeepin.github.io/funnylog/"}, | ||
{text: "文字识别 | pdocr-rpc", link: "https://linuxdeepin.github.io/pdocr-rpc/"}, | ||
] | ||
}, | ||
], | ||
|
||
sidebar: { | ||
"/设计/": [ | ||
{ | ||
text: "框架设计", | ||
collapsed: false, | ||
items: [ | ||
{text: "YouQu3架构设计规划", link: "/设计/YouQu3架构设计规划"}, | ||
{text: "APP工程设计方案", link: "/设计/APP工程设计方案"}, | ||
] | ||
}, | ||
], | ||
}, | ||
search: { | ||
provider: 'local' | ||
}, | ||
ignoreDeadLinks: true, | ||
// ========================================================= | ||
logo: {src: '/logo.png', width: 26, height: 30}, | ||
socialLinks: [ | ||
{icon: 'github', link: 'https://github.com/funny-dream/youqu3'} | ||
], | ||
footer: { | ||
copyright: `版权所有 © 2024-${new Date().getFullYear()} 统信软件` | ||
}, | ||
//大纲显示2-3级标题 | ||
outline: [2, 4], | ||
//大纲顶部标题 | ||
outlineTitle: '当前页大纲', | ||
|
||
docFooter: { | ||
prev: '上一页', | ||
next: '下一页' | ||
}, | ||
|
||
lastUpdated: { | ||
text: '最后更新于', | ||
formatOptions: { | ||
dateStyle: 'short', | ||
timeStyle: 'medium' | ||
} | ||
}, | ||
|
||
langMenuLabel: '多语言', | ||
returnToTopLabel: '回到顶部', | ||
sidebarMenuLabel: '菜单', | ||
darkModeSwitchLabel: '主题', | ||
lightModeSwitchTitle: '切换到浅色模式', | ||
darkModeSwitchTitle: '切换到深色模式' | ||
}, | ||
}) | ||
); |
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,41 @@ | ||
<script setup> | ||
import DefaultTheme from 'vitepress/theme' | ||
import { useData } from 'vitepress' | ||
import { ref } from 'vue' | ||
const { Layout } = DefaultTheme | ||
const defaultAuthor = 'mikigo' | ||
const { frontmatter } = useData() //这里的frontmatter就是各个md文件中自己写在最上面的东西 | ||
</script> | ||
|
||
<template> | ||
<div class="page_info"> | ||
<span class="page_info_item" v-if="frontmatter.Author"> | ||
🎨 | ||
<span>作者:{{ frontmatter.Author }}</span> | ||
</span> | ||
<span class="page_info_item" v-if="frontmatter.date"> | ||
🕐 | ||
<span>发表于:{{ frontmatter.date ? frontmatter.date.substring(0, 10) : '' }}</span> | ||
</span> | ||
<span class="page_info_item"> | ||
📔 | ||
<span id="busuanzi_container_page_pv"> | ||
阅读量:<span id="busuanzi_value_page_pv"></span> | ||
</span> | ||
</span> | ||
|
||
</div> | ||
</template> | ||
|
||
<style> | ||
.page_info { | ||
margin-bottom: 48px; | ||
} | ||
.page_info .page_info_item { | ||
font-size: 16px; | ||
color: #7f7f7f; | ||
margin-right: 10px; | ||
} | ||
</style> |
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 @@ | ||
<template> | ||
<div class="statistics"> | ||
<div class="busuanzi"> | ||
<span id="busuanzi_container_site_pv" style="display:none;margin-right: 20px;"> | ||
本站总访问量 | ||
<span id="busuanzi_value_site_pv"></span>次 | ||
<!-- <span class="post-meta-divider">|</span> --> | ||
</span> | ||
❤️ | ||
<span id="busuanzi_container_site_uv" style="display:none;margin-left: 20px;"> | ||
本站访客数 | ||
<span id="busuanzi_value_site_uv"></span>人 | ||
</span> | ||
</div> | ||
</div> | ||
</template> | ||
<style> | ||
.statistics { | ||
text-align: center; | ||
bottom: 100px; | ||
position: absolute; | ||
margin: 0 auto; | ||
left: 0; | ||
right: 0; | ||
color: grey; | ||
font-size: 15px; | ||
} | ||
</style> |
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,72 @@ | ||
import DefaultTheme from 'vitepress/theme'; | ||
import { h, onMounted, watch, nextTick } from "vue"; | ||
import giscusTalk from 'vitepress-plugin-comment-with-giscus'; | ||
import { useData, useRoute, inBrowser } from 'vitepress'; | ||
import mediumZoom from 'medium-zoom'; | ||
import vitepressBackToTop from 'vitepress-plugin-back-to-top'; | ||
import 'vitepress-plugin-back-to-top/dist/style.css'; | ||
import "vitepress-markdown-timeline/dist/theme/index.css"; | ||
import busuanzi from 'busuanzi.pure.js'; | ||
|
||
import './style/index.css'; | ||
import PageInfo from './components/PageInfo.vue'; | ||
|
||
export default { | ||
extends: DefaultTheme, | ||
|
||
Layout() { | ||
return h(DefaultTheme.Layout, null, { | ||
"doc-before": () => h(PageInfo) // 文章阅读统计 | ||
}); | ||
}, | ||
|
||
enhanceApp({ app , router }) { | ||
if (inBrowser) { | ||
router.onAfterRouteChanged = () => { | ||
busuanzi.fetch() | ||
}; | ||
} | ||
|
||
vitepressBackToTop({ | ||
// default | ||
threshold:300 | ||
}) | ||
|
||
}, | ||
|
||
setup() { | ||
// Get frontmatter and route | ||
const {frontmatter} = useData(); | ||
const route = useRoute(); | ||
const initZoom = () => { | ||
mediumZoom('.main img', { background: 'var(--vp-c-bg)' }) | ||
}; | ||
onMounted(() => { | ||
initZoom() | ||
}); | ||
watch( | ||
() => route.path, | ||
() => nextTick(() => initZoom()) | ||
); | ||
|
||
// giscus配置 | ||
giscusTalk( | ||
{ | ||
repo: 'linuxdeepin/youqu', //仓库 | ||
repoId: 'R_kgDOKDOpHg', //仓库ID | ||
category: 'Announcements', // 讨论分类 | ||
categoryId: 'DIC_kwDOKDOpHs4CcRPx', //讨论分类ID | ||
mapping: 'pathname', | ||
inputPosition: 'top', | ||
lang: 'zh-CN', | ||
}, | ||
{ | ||
frontmatter, route | ||
}, | ||
//默认值为true,表示已启用,此参数可以忽略; | ||
//如果为false,则表示未启用 | ||
//您可以使用“comment:true”序言在页面上单独启用它 | ||
true | ||
) | ||
}, | ||
} |
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 @@ | ||
@import './var.css'; |
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,7 @@ | ||
.medium-zoom-image { | ||
z-index: 21; | ||
} | ||
|
||
.medium-zoom-overlay { | ||
z-index: 20; | ||
} |
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,23 @@ | ||
h1 { | ||
background: -webkit-linear-gradient(120deg, #28C76F 30%, #28C76F); | ||
background-clip: text; | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
|
||
} | ||
|
||
h2 { | ||
background: -webkit-linear-gradient(120deg, #28C76F 30%, #28C76F); | ||
background-clip: text; | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
|
||
} | ||
|
||
.medium-zoom-overlay { | ||
z-index: 20; | ||
} | ||
|
||
.medium-zoom-image { | ||
z-index: 9999 !important;/* 给的值是21,但是实测盖不住,直接999 */ | ||
} |
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 @@ | ||
set -e | ||
ROOT_DIR=$(dirname "$(pwd)") | ||
|
||
cd ${ROOT_DIR} | ||
docs_path="$( cd "$( dirname "$0")" && pwd)" | ||
if [[ "${docs_path}" != "${PWD}" ]]; then | ||
cd "${docs_path}" || exit 1 | ||
fi | ||
|
||
node_version=v18.16.1 | ||
opt_node_dir="node${node_version}" | ||
|
||
if ! command -v node &> /dev/null; then | ||
wget https://cdn.npmmirror.com/binaries/node/${node_version}/node-${node_version}-linux-x64.tar.xz | ||
tar -xvJf node-${node_version}-linux-x64.tar.xz | ||
sudo rm -rf /opt/${opt_node_dir} | ||
sudo mv node-${node_version}-linux-x64 /opt/${opt_node_dir} | ||
sudo rm -rf /usr/local/bin/npm; sudo ln -s /opt/${opt_node_dir}/bin/npm /usr/local/bin/npm | ||
sudo rm -rf /usr/local/bin/node; sudo ln -s /opt/${opt_node_dir}/bin/node /usr/local/bin/node | ||
elif ! command -v pnpm &> /dev/null; then | ||
npm config set registry https://registry.npmmirror.com | ||
npm install -g pnpm | ||
sudo rm -rf /usr/local/bin/pnpm; sudo ln -s /opt/${opt_node_dir}/bin/pnpm /usr/local/bin/pnpm | ||
sudo rm -rf /usr/local/bin/pnpx; sudo ln -s /opt/${opt_node_dir}/bin/pnpx /usr/local/bin/pnpx | ||
fi | ||
|
||
pnpm add -D vitepress | ||
pnpm i vitepress-plugin-comment-with-giscus | ||
pnpm i vitepress-plugin-back-to-top | ||
pnpm add -D busuanzi.pure.js | ||
pnpm add -D markdown-it-mathjax3 | ||
pnpm i @mermaid-js/[email protected] [email protected] [email protected] | ||
pnpm i medium-zoom | ||
pnpm add -D vitepress-markdown-timeline |
Oops, something went wrong.