2
0
mirror of https://github.com/acepanel/acepanel.github.io.git synced 2026-02-04 07:57:17 +08:00

feat: 添加模板

This commit is contained in:
耗子
2024-12-14 02:20:38 +08:00
parent 14234d61b7
commit 1d8eee7a68
13 changed files with 192 additions and 170 deletions

BIN
.github/assets/logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
.github/assets/ui.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

View File

@@ -1,5 +1,10 @@
import {defineConfig} from 'vitepress'
const resp = await (await fetch('https://panel.haozi.net/api/versions')).json()
const versions = resp.data.map((item: any) => {
return item.version
})
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "耗子面板",
@@ -11,7 +16,7 @@ export default defineConfig({
label: '简体中文',
lang: 'zh-Hans',
},
en: {
/*en: {
label: 'English',
lang: 'en',
title: 'Rat Panel',
@@ -23,32 +28,66 @@ export default defineConfig({
footer: {
message: 'This website is powered by Rat Panel',
copyright: '© 2022-2024 Tianjin Rat Technology Co., Ltd All Rights Reserved'
}
},
editLink: {
pattern: "https://github.com/ratpanel/ratpanel.github.io/edit/main/src/:path",
text: "Edit this page on GitHub"
},
},
},
},*/
},
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: '/.github/assets/logo.png',
nav: [
{text: '首页', link: '/'},
{text: 'Examples', link: '/markdown-examples'}
{text: '文档', link: '/quickstart/install'},
{text: '支持', link: '/support'},
{text: '🔥证书', link: '/cert'},
{text: '关于', link: '/about'},
],
sidebar: [
{
text: 'Examples',
text: '快速上手',
collapsed: true,
items: [
{text: 'Markdown Examples', link: '/markdown-examples'},
{text: 'Runtime API Examples', link: '/api-examples'}
{
text: '安装',
link: '/quickstart/install'
},
],
},
{
text: '深入了解',
collapsed: true,
items: [],
},
{
text: '版本日志',
collapsed: true,
items: [
...versions.map(version => {
return {
text: version,
link: `/version-${version}`
}
})
]
}
],
socialLinks: [
{icon: 'github', link: 'https://github.com/vuejs/vitepress'}
{icon: 'github', link: 'https://github.com/TheTNB/panel'},
{icon: 'tencentqq', link: 'https://jq.qq.com/?_wv=1027&k=I1oJKSTH'},
{icon: 'wechat', link: 'https://work.weixin.qq.com/gm/d8ebf618553398d454e3378695c858b6'},
],
footer: {
message: '<b style="font-size: larger; padding-bottom: 20px">严禁使用耗子面板从事违法活动,我司拒绝对违规使用的用户提供任何服务</b>',
copyright: '© 2022-2024 天津耗子科技有限公司 版权所有丨<a target="_blank" href="https://beian.miit.gov.cn/" rel="noreferrer">津ICP备2022009678号-1</a>丨<a target="_blank" href="https://beian.mps.gov.cn/#/query/webSearch?code=12011502000848" rel="noreferrer">津公网安备12011502000848号</a>'
},
editLink: {
pattern: "https://github.com/ratpanel/ratpanel.github.io/edit/main/src/:path",
text: "在 GitHub 上编辑此页面"
},
search: {
provider: 'local',
options: {
@@ -72,5 +111,5 @@ export default defineConfig({
}
}
}
}
},
})

7
about.md Normal file
View File

@@ -0,0 +1,7 @@
---
sidebar: false
prev: false
next: false
---
# 关于

View File

@@ -1,49 +0,0 @@
---
outline: deep
---
# Runtime API Examples
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
```md
<script setup>
import { useData } from 'vitepress'
const { theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```
<script setup>
import { useData } from 'vitepress'
const { site, theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
## More
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).

7
cert.md Normal file
View File

@@ -0,0 +1,7 @@
---
sidebar: false
prev: false
next: false
---
# 证书

View File

@@ -13,10 +13,10 @@ hero:
target: _blank
- theme: alt
text: 快速安装
link: /install
link: /quickstart/install
- theme: alt
text: 浏览文档
link: /docs
text: 进阶手册
link: /advanced/index
features:
- icon: ✨

View File

@@ -1,85 +0,0 @@
# Markdown Extension Examples
This page demonstrates some of the built-in markdown extensions provided by VitePress.
## Syntax Highlighting
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:
**Input**
````md
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
````
**Output**
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
## Custom Containers
**Input**
```md
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
```
**Output**
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
## More
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).

58
pnpm-lock.yaml generated
View File

@@ -10,10 +10,10 @@ importers:
devDependencies:
vitepress:
specifier: ^1.5.0
version: 1.5.0(@algolia/client-search@5.17.1)(postcss@8.4.49)(search-insights@2.17.3)
version: 1.5.0(@algolia/client-search@5.17.1)(postcss@8.4.49)(search-insights@2.17.3)(typescript@5.7.2)
vue:
specifier: ^3.5.13
version: 3.5.13
version: 3.5.13(typescript@5.7.2)
packages:
@@ -694,6 +694,11 @@ packages:
trim-lines@3.0.1:
resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
typescript@5.7.2:
resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==}
engines: {node: '>=14.17'}
hasBin: true
unist-util-is@6.0.0:
resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==}
@@ -1114,10 +1119,10 @@ snapshots:
'@ungap/structured-clone@1.2.1': {}
'@vitejs/plugin-vue@5.2.1(vite@5.4.11)(vue@3.5.13)':
'@vitejs/plugin-vue@5.2.1(vite@5.4.11)(vue@3.5.13(typescript@5.7.2))':
dependencies:
vite: 5.4.11
vue: 3.5.13
vue: 3.5.13(typescript@5.7.2)
'@vue/compiler-core@3.5.13':
dependencies:
@@ -1183,29 +1188,29 @@ snapshots:
'@vue/shared': 3.5.13
csstype: 3.1.3
'@vue/server-renderer@3.5.13(vue@3.5.13)':
'@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.7.2))':
dependencies:
'@vue/compiler-ssr': 3.5.13
'@vue/shared': 3.5.13
vue: 3.5.13
vue: 3.5.13(typescript@5.7.2)
'@vue/shared@3.5.13': {}
'@vueuse/core@11.3.0(vue@3.5.13)':
'@vueuse/core@11.3.0(vue@3.5.13(typescript@5.7.2))':
dependencies:
'@types/web-bluetooth': 0.0.20
'@vueuse/metadata': 11.3.0
'@vueuse/shared': 11.3.0(vue@3.5.13)
vue-demi: 0.14.10(vue@3.5.13)
'@vueuse/shared': 11.3.0(vue@3.5.13(typescript@5.7.2))
vue-demi: 0.14.10(vue@3.5.13(typescript@5.7.2))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
'@vueuse/integrations@11.3.0(focus-trap@7.6.2)(vue@3.5.13)':
'@vueuse/integrations@11.3.0(focus-trap@7.6.2)(vue@3.5.13(typescript@5.7.2))':
dependencies:
'@vueuse/core': 11.3.0(vue@3.5.13)
'@vueuse/shared': 11.3.0(vue@3.5.13)
vue-demi: 0.14.10(vue@3.5.13)
'@vueuse/core': 11.3.0(vue@3.5.13(typescript@5.7.2))
'@vueuse/shared': 11.3.0(vue@3.5.13(typescript@5.7.2))
vue-demi: 0.14.10(vue@3.5.13(typescript@5.7.2))
optionalDependencies:
focus-trap: 7.6.2
transitivePeerDependencies:
@@ -1214,9 +1219,9 @@ snapshots:
'@vueuse/metadata@11.3.0': {}
'@vueuse/shared@11.3.0(vue@3.5.13)':
'@vueuse/shared@11.3.0(vue@3.5.13(typescript@5.7.2))':
dependencies:
vue-demi: 0.14.10(vue@3.5.13)
vue-demi: 0.14.10(vue@3.5.13(typescript@5.7.2))
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@@ -1450,6 +1455,9 @@ snapshots:
trim-lines@3.0.1: {}
typescript@5.7.2:
optional: true
unist-util-is@6.0.0:
dependencies:
'@types/unist': 3.0.3
@@ -1491,7 +1499,7 @@ snapshots:
optionalDependencies:
fsevents: 2.3.3
vitepress@1.5.0(@algolia/client-search@5.17.1)(postcss@8.4.49)(search-insights@2.17.3):
vitepress@1.5.0(@algolia/client-search@5.17.1)(postcss@8.4.49)(search-insights@2.17.3)(typescript@5.7.2):
dependencies:
'@docsearch/css': 3.8.0
'@docsearch/js': 3.8.0(@algolia/client-search@5.17.1)(search-insights@2.17.3)
@@ -1500,17 +1508,17 @@ snapshots:
'@shikijs/transformers': 1.24.2
'@shikijs/types': 1.24.2
'@types/markdown-it': 14.1.2
'@vitejs/plugin-vue': 5.2.1(vite@5.4.11)(vue@3.5.13)
'@vitejs/plugin-vue': 5.2.1(vite@5.4.11)(vue@3.5.13(typescript@5.7.2))
'@vue/devtools-api': 7.6.8
'@vue/shared': 3.5.13
'@vueuse/core': 11.3.0(vue@3.5.13)
'@vueuse/integrations': 11.3.0(focus-trap@7.6.2)(vue@3.5.13)
'@vueuse/core': 11.3.0(vue@3.5.13(typescript@5.7.2))
'@vueuse/integrations': 11.3.0(focus-trap@7.6.2)(vue@3.5.13(typescript@5.7.2))
focus-trap: 7.6.2
mark.js: 8.11.1
minisearch: 7.1.1
shiki: 1.24.2
vite: 5.4.11
vue: 3.5.13
vue: 3.5.13(typescript@5.7.2)
optionalDependencies:
postcss: 8.4.49
transitivePeerDependencies:
@@ -1541,16 +1549,18 @@ snapshots:
- typescript
- universal-cookie
vue-demi@0.14.10(vue@3.5.13):
vue-demi@0.14.10(vue@3.5.13(typescript@5.7.2)):
dependencies:
vue: 3.5.13
vue: 3.5.13(typescript@5.7.2)
vue@3.5.13:
vue@3.5.13(typescript@5.7.2):
dependencies:
'@vue/compiler-dom': 3.5.13
'@vue/compiler-sfc': 3.5.13
'@vue/runtime-dom': 3.5.13
'@vue/server-renderer': 3.5.13(vue@3.5.13)
'@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@5.7.2))
'@vue/shared': 3.5.13
optionalDependencies:
typescript: 5.7.2
zwitch@2.0.4: {}

61
quickstart/install.md Normal file
View File

@@ -0,0 +1,61 @@
# 安装面板
## 运行环境
耗子面板支持 `amd64` | `arm64` 架构下的主流系统,下表中的系统均已测试 LNMP 环境安装。
优先建议使用标注**推荐**的系统,无特殊情况不建议使用标注**不推荐**的系统。
不在下表中的其他系统,可自行尝试安装,但不提供技术支持(接受相关 PR 提交)。
| 系统 | 版本 | 备注 |
|---------------------|-----|-----|
| AlmaLinux | 9 | 推荐 |
| AlmaLinux | 8 | 不推荐 |
| RockyLinux | 9 | 支持 |
| RockyLinux | 8 | 不推荐 |
| CentOS Stream | 9 | 不推荐 |
| CentOS Stream | 8 | 不推荐 |
| Ubuntu | 24 | 推荐 |
| Ubuntu | 22 | 支持 |
| Debian | 12 | 推荐 |
| Debian | 11 | 支持 |
| OpenCloudOS | 9 | 支持 |
| TencentOS Server | 4 | 支持 |
| TencentOS Server | 3.1 | 不推荐 |
| Alibaba Cloud Linux | 3.2 | 不推荐 |
| Anolis | 8 | 不推荐 |
| openEuler | 22 | 不推荐 |
随着系统版本的不断更新,我们亦可能会终止部分过于老旧的系统的支持,以保证面板的健壮性。
## 挂载硬盘
如果您的服务器有未挂载的数据盘,可在安装前以`root`用户登录服务器运行以下命令自动挂载,面板安装后不支持跨目录迁移。
```shell
curl -fsLm 10 -o auto_mount.sh https://dl.cdn.haozi.net/panel/auto_mount.sh && bash auto_mount.sh
```
## 安装面板
> **Warning**
> 安装面板前,您需要了解 LNMP 环境的基本知识,以及如何处理常见的 LNMP 环境问题,我们不建议 0 基础的用户安装和使用耗子面板。
`root`用户登录服务器,运行以下命令安装面板:
```shell
curl -fsLm 10 -o install.sh https://dl.cdn.haozi.net/panel/install.sh && bash install.sh
```
## 卸载面板
优先建议备份数据重装系统,这样可以保证系统纯净。
如果您无法重装系统,请以`root`用户登录服务器,执行以下命令卸载面板:
```shell
curl -fsLm 10 -o uninstall.sh https://dl.cdn.haozi.net/panel/uninstall.sh && bash uninstall.sh
```
卸载面板前请务必备份好所有数据,提前卸载面板全部应用。卸载后数据将**无法恢复**

7
support.md Normal file
View File

@@ -0,0 +1,7 @@
---
sidebar: false
prev: false
next: false
---
# 支持

8
version-[version].md Normal file
View File

@@ -0,0 +1,8 @@
# v{{ $params.version }}
- 版本类型:{{ $params.type == 'stable' ? '稳定版' : '测试版' }}
- 发布时间:{{ $params.time }}
## 更新内容
<!-- @content -->

View File

@@ -0,0 +1,17 @@
export default {
async paths() {
const resp = await (await fetch('https://panel.haozi.net/api/versions')).json()
if (!resp.message || resp.message !== 'success') return []
return resp.data.map((item: any) => {
return {
params: {
version: item.version,
type: item.type,
time: item.updated_at.replace('T', ' ').slice(0, 19)
},
content: item.description
}
})
}
}