diff --git a/.github/assets/logo.png b/.github/assets/logo.png new file mode 100644 index 0000000..ab5e212 Binary files /dev/null and b/.github/assets/logo.png differ diff --git a/.github/assets/ui.png b/.github/assets/ui.png deleted file mode 100644 index 311c905..0000000 Binary files a/.github/assets/ui.png and /dev/null differ diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 61a0e47..a959c1e 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -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: '严禁使用耗子面板从事违法活动,我司拒绝对违规使用的用户提供任何服务', copyright: '© 2022-2024 天津耗子科技有限公司 版权所有丨津ICP备2022009678号-1丨津公网安备12011502000848号' }, + 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({ } } } - } + }, }) diff --git a/about.md b/about.md new file mode 100644 index 0000000..89599b0 --- /dev/null +++ b/about.md @@ -0,0 +1,7 @@ +--- +sidebar: false +prev: false +next: false +--- + +# 关于 \ No newline at end of file diff --git a/api-examples.md b/api-examples.md deleted file mode 100644 index 6bd8bb5..0000000 --- a/api-examples.md +++ /dev/null @@ -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 - - -## Results - -### Theme Data -
{{ theme }}
-
-### Page Data
-{{ page }}
-
-### Page Frontmatter
-{{ frontmatter }}
-```
-
-
-
-## Results
-
-### Theme Data
-{{ theme }}
-
-### Page Data
-{{ page }}
-
-### Page Frontmatter
-{{ frontmatter }}
-
-## More
-
-Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).
diff --git a/cert.md b/cert.md
new file mode 100644
index 0000000..6b4b200
--- /dev/null
+++ b/cert.md
@@ -0,0 +1,7 @@
+---
+sidebar: false
+prev: false
+next: false
+---
+
+# 证书
\ No newline at end of file
diff --git a/index.md b/index.md
index b42108b..9549fef 100644
--- a/index.md
+++ b/index.md
@@ -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: ✨
diff --git a/markdown-examples.md b/markdown-examples.md
deleted file mode 100644
index f9258a5..0000000
--- a/markdown-examples.md
+++ /dev/null
@@ -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).
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 011b9db..dc22ce9 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -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: {}
diff --git a/quickstart/install.md b/quickstart/install.md
new file mode 100644
index 0000000..2b6c15f
--- /dev/null
+++ b/quickstart/install.md
@@ -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
+```
+
+卸载面板前请务必备份好所有数据,提前卸载面板全部应用。卸载后数据将**无法恢复**!
\ No newline at end of file
diff --git a/support.md b/support.md
new file mode 100644
index 0000000..9bdc2ff
--- /dev/null
+++ b/support.md
@@ -0,0 +1,7 @@
+---
+sidebar: false
+prev: false
+next: false
+---
+
+# 支持
\ No newline at end of file
diff --git a/version-[version].md b/version-[version].md
new file mode 100644
index 0000000..359bfd5
--- /dev/null
+++ b/version-[version].md
@@ -0,0 +1,8 @@
+# v{{ $params.version }}
+
+- 版本类型:{{ $params.type == 'stable' ? '稳定版' : '测试版' }}
+- 发布时间:{{ $params.time }}
+
+## 更新内容
+
+
diff --git a/version-[version].paths.ts b/version-[version].paths.ts
new file mode 100644
index 0000000..46b020e
--- /dev/null
+++ b/version-[version].paths.ts
@@ -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
+ }
+ })
+ }
+}
\ No newline at end of file