diff --git a/.gitignore b/.gitignore index c9cecaa..c1d2cdf 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,7 @@ main.exe main.cmdY docs/.vuepress/.cache/ docs/.vuepress/.temp/ -docs/.vuepress/dist/ \ No newline at end of file +docs/.vuepress/dist/ +package.json +pnpm-lock.yaml +tsconfig.json \ No newline at end of file diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 2767b9a..f1677e1 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -1,15 +1,21 @@ -import { defineUserConfig } from "vuepress"; +import {defineUserConfig} from "vuepress"; import theme from "./theme.js"; export default defineUserConfig({ - base: "/", + base: "/", - lang: "zh-CN", - title: "LiteyukiBot", - description: "vuepress-theme-hope 的文档演示", + lang: "zh-CN", + title: "LiteyukiBot", + description: "An OneBot Standard ChatBot", + head: [ +// 设置 favor.ico,.vuepress/public 下 + [ + 'link', {rel: 'icon', href: 'https://cdn.liteyuki.icu/favicon.ico'} + ] + ], - theme, + theme, - // 和 PWA 一起启用 - // shouldPrefetch: false, + // 和 PWA 一起启用 + // shouldPrefetch: false, }); diff --git a/docs/.vuepress/navbar.ts b/docs/.vuepress/navbar.ts index e79f59a..0a0a9d2 100644 --- a/docs/.vuepress/navbar.ts +++ b/docs/.vuepress/navbar.ts @@ -2,5 +2,6 @@ import { navbar } from "vuepress-theme-hope"; export default navbar([ "/", - "/demo/", + "/deployment/", + "/usage/", ]); diff --git a/docs/.vuepress/public/favicon.ico b/docs/.vuepress/public/favicon.ico index b411f79..73e9e36 100644 Binary files a/docs/.vuepress/public/favicon.ico and b/docs/.vuepress/public/favicon.ico differ diff --git a/docs/.vuepress/sidebar.ts b/docs/.vuepress/sidebar.ts index a2b1556..d50fd55 100644 --- a/docs/.vuepress/sidebar.ts +++ b/docs/.vuepress/sidebar.ts @@ -4,22 +4,18 @@ export default sidebar({ "/": [ "", { - text: "案例", + text: "项目部署", icon: "laptop-code", - prefix: "demo/", - link: "demo/", + prefix: "deployment/", + link: "deployment/", children: "structure", }, { - text: "文档", - icon: "book", - prefix: "guide/", + text: "使用手册", + icon: "laptop-code", + prefix: "usage/", + link: "usage/", children: "structure", }, - { - text: "幻灯片", - icon: "person-chalkboard", - link: "https://plugin-md-enhance.vuejs.press/zh/guide/content/revealjs/demo.html", - }, ], }); diff --git a/docs/.vuepress/theme.js b/docs/.vuepress/theme.js new file mode 100644 index 0000000..32e982e --- /dev/null +++ b/docs/.vuepress/theme.js @@ -0,0 +1,187 @@ +import {hopeTheme} from "vuepress-theme-hope"; +import navbar from "./navbar.js"; +import sidebar from "./sidebar.js"; + +export default hopeTheme({ + hostname: "https://vuepress-theme-hope-docs-demo.netlify.app", + + author: { + name: "SnowyKami", + url: "https://snowykami.me", + }, + + iconAssets: "fontawesome-with-brands", + + logo: "https://cdn.liteyuki.icu/static/img/logo.png", + + repo: "https://github.com/snowykami/LiteyukiBot", + + docsDir: "src", + + // 导航栏 + navbar, + + // 侧边栏 + sidebar, + + // 页脚 + footer: "LiteyukiBot", + displayFooter: true, + + // 加密配置 + encrypt: { + config: { + "/demo/encrypt.html": ["1234"], + }, + }, + + // 多语言配置 + metaLocales: { + editLink: "在 GitHub 上编辑此页", + }, + + // 如果想要实时查看任何改变,启用它。注: 这对更新性能有很大负面影响 + // hotReload: true, + + // 在这里配置主题提供的插件 + plugins: { + // 你应该自行生成自己的评论服务 + comment: { + provider: "Giscus", + repo: "vuepress-theme-hope/giscus-discussions", + repoId: "R_kgDOG_Pt2A", + category: "Announcements", + categoryId: "DIC_kwDOG_Pt2M4COD69", + }, + + components: { + components: ["Badge", "VPCard"], + }, + + // 此处开启了很多功能用于演示,你应仅保留用到的功能。 + mdEnhance: { + align: true, + attrs: true, + codetabs: true, + component: true, + demo: true, + figure: true, + imgLazyload: true, + imgSize: true, + include: true, + mark: true, + stylize: [ + { + matcher: "Recommended", + replacer: ({tag}) => { + if (tag === "em") + return { + tag: "Badge", + attrs: {type: "tip"}, + content: "Recommended", + }; + }, + }, + ], + sub: true, + sup: true, + tabs: true, + vPre: true, + + // 在启用之前安装 chart.js + // chart: true, + + // insert component easily + + // 在启用之前安装 echarts + // echarts: true, + + // 在启用之前安装 flowchart.ts + // flowchart: true, + + // gfm requires mathjax-full to provide tex support + // gfm: true, + + // 在启用之前安装 katex + // katex: true, + + // 在启用之前安装 mathjax-full + // mathjax: true, + + // 在启用之前安装 mermaid + // mermaid: true, + + // playground: { + // presets: ["ts", "vue"], + // }, + + // 在启用之前安装 reveal.js + // revealJs: { + // plugins: ["highlight", "math", "search", "notes", "zoom"], + // }, + + // 在启用之前安装 @vue/repl + // vuePlayground: true, + + // install sandpack-vue3 before enabling it + // sandpack: true, + }, + + // 如果你需要 PWA。安装 @vuepress/plugin-pwa 并取消下方注释 + // pwa: { + // favicon: "/favicon.ico", + // cacheHTML: true, + // cachePic: true, + // appendBase: true, + // apple: { + // icon: "/assets/icon/apple-icon-152.png", + // statusBarColor: "black", + // }, + // msTile: { + // image: "/assets/icon/ms-icon-144.png", + // color: "#ffffff", + // }, + // manifest: { + // icons: [ + // { + // src: "/assets/icon/chrome-mask-512.png", + // sizes: "512x512", + // purpose: "maskable", + // type: "image/png", + // }, + // { + // src: "/assets/icon/chrome-mask-192.png", + // sizes: "192x192", + // purpose: "maskable", + // type: "image/png", + // }, + // { + // src: "/assets/icon/chrome-512.png", + // sizes: "512x512", + // type: "image/png", + // }, + // { + // src: "/assets/icon/chrome-192.png", + // sizes: "192x192", + // type: "image/png", + // }, + // ], + // shortcuts: [ + // { + // name: "Demo", + // short_name: "Demo", + // url: "/demo/", + // icons: [ + // { + // src: "/assets/icon/guide-maskable.png", + // sizes: "192x192", + // purpose: "maskable", + // type: "image/png", + // }, + // ], + // }, + // ], + // }, + // }, + }, +}); diff --git a/docs/.vuepress/theme.ts b/docs/.vuepress/theme.ts deleted file mode 100644 index 2b9fdc1..0000000 --- a/docs/.vuepress/theme.ts +++ /dev/null @@ -1,187 +0,0 @@ -import { hopeTheme } from "vuepress-theme-hope"; -import navbar from "./navbar.js"; -import sidebar from "./sidebar.js"; - -export default hopeTheme({ - hostname: "https://vuepress-theme-hope-docs-demo.netlify.app", - - author: { - name: "Mr.Hope", - url: "https://mister-hope.com", - }, - - iconAssets: "fontawesome-with-brands", - - logo: "https://theme-hope-assets.vuejs.press/logo.svg", - - repo: "vuepress-theme-hope/vuepress-theme-hope", - - docsDir: "src", - - // 导航栏 - navbar, - - // 侧边栏 - sidebar, - - // 页脚 - footer: "默认页脚", - displayFooter: true, - - // 加密配置 - encrypt: { - config: { - "/demo/encrypt.html": ["1234"], - }, - }, - - // 多语言配置 - metaLocales: { - editLink: "在 GitHub 上编辑此页", - }, - - // 如果想要实时查看任何改变,启用它。注: 这对更新性能有很大负面影响 - // hotReload: true, - - // 在这里配置主题提供的插件 - plugins: { - // 你应该自行生成自己的评论服务 - comment: { - provider: "Giscus", - repo: "vuepress-theme-hope/giscus-discussions", - repoId: "R_kgDOG_Pt2A", - category: "Announcements", - categoryId: "DIC_kwDOG_Pt2M4COD69", - }, - - components: { - components: ["Badge", "VPCard"], - }, - - // 此处开启了很多功能用于演示,你应仅保留用到的功能。 - mdEnhance: { - align: true, - attrs: true, - codetabs: true, - component: true, - demo: true, - figure: true, - imgLazyload: true, - imgSize: true, - include: true, - mark: true, - stylize: [ - { - matcher: "Recommended", - replacer: ({ tag }) => { - if (tag === "em") - return { - tag: "Badge", - attrs: { type: "tip" }, - content: "Recommended", - }; - }, - }, - ], - sub: true, - sup: true, - tabs: true, - vPre: true, - - // 在启用之前安装 chart.js - // chart: true, - - // insert component easily - - // 在启用之前安装 echarts - // echarts: true, - - // 在启用之前安装 flowchart.ts - // flowchart: true, - - // gfm requires mathjax-full to provide tex support - // gfm: true, - - // 在启用之前安装 katex - // katex: true, - - // 在启用之前安装 mathjax-full - // mathjax: true, - - // 在启用之前安装 mermaid - // mermaid: true, - - // playground: { - // presets: ["ts", "vue"], - // }, - - // 在启用之前安装 reveal.js - // revealJs: { - // plugins: ["highlight", "math", "search", "notes", "zoom"], - // }, - - // 在启用之前安装 @vue/repl - // vuePlayground: true, - - // install sandpack-vue3 before enabling it - // sandpack: true, - }, - - // 如果你需要 PWA。安装 @vuepress/plugin-pwa 并取消下方注释 - // pwa: { - // favicon: "/favicon.ico", - // cacheHTML: true, - // cachePic: true, - // appendBase: true, - // apple: { - // icon: "/assets/icon/apple-icon-152.png", - // statusBarColor: "black", - // }, - // msTile: { - // image: "/assets/icon/ms-icon-144.png", - // color: "#ffffff", - // }, - // manifest: { - // icons: [ - // { - // src: "/assets/icon/chrome-mask-512.png", - // sizes: "512x512", - // purpose: "maskable", - // type: "image/png", - // }, - // { - // src: "/assets/icon/chrome-mask-192.png", - // sizes: "192x192", - // purpose: "maskable", - // type: "image/png", - // }, - // { - // src: "/assets/icon/chrome-512.png", - // sizes: "512x512", - // type: "image/png", - // }, - // { - // src: "/assets/icon/chrome-192.png", - // sizes: "192x192", - // type: "image/png", - // }, - // ], - // shortcuts: [ - // { - // name: "Demo", - // short_name: "Demo", - // url: "/demo/", - // icons: [ - // { - // src: "/assets/icon/guide-maskable.png", - // sizes: "192x192", - // purpose: "maskable", - // type: "image/png", - // }, - // ], - // }, - // ], - // }, - // }, - }, -}); diff --git a/docs/README.md b/docs/README.md index 074ffc1..f68d08f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,7 +12,7 @@ tagline: 基于Nonebot2的OneBot标准聊天机器人,不仅仅局限于OneBot actions: - text: 使用指南 icon: lightbulb - link: ./demo/ + link: ./usage/ type: primary - text: 文档 @@ -25,7 +25,7 @@ actions: #5. 启动`python main.py` highlights: - - header: 易于安装 + - header: 快速部署 image: /assets/image/box.svg bgImage: https://theme-hope-assets.vuejs.press/bg/3-light.svg bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg diff --git a/docs/demo/README.md b/docs/demo/README.md index 31ede9b..8d83ff5 100644 --- a/docs/demo/README.md +++ b/docs/demo/README.md @@ -6,4 +6,4 @@ category: - 使用指南 --- - +a diff --git a/docs/demo/layout.md b/docs/demo/layout.md index b89b60a..123dc67 100644 --- a/docs/demo/layout.md +++ b/docs/demo/layout.md @@ -1,9 +1,8 @@ --- title: 布局 icon: object-group -order: 2 -category: - - 指南 +order: 3 +category: 使用指南 tag: - 布局 --- diff --git a/docs/demo/page.md b/docs/demo/page.md index 23d1b81..3758c7e 100644 --- a/docs/demo/page.md +++ b/docs/demo/page.md @@ -6,7 +6,7 @@ cover: /assets/images/cover1.jpg # 这是页面的图标 icon: file # 这是侧边栏的顺序 -order: 3 +order: 4 # 设置作者 author: Ms.Hope # 设置写作时间 diff --git a/docs/deployment/README.md b/docs/deployment/README.md new file mode 100644 index 0000000..e4370a2 --- /dev/null +++ b/docs/deployment/README.md @@ -0,0 +1,6 @@ +--- +title: 快速部署 +index: false +icon: laptop-code +category: 安装和配置 +--- diff --git a/docs/deployment/config.md b/docs/deployment/config.md new file mode 100644 index 0000000..9a4f991 --- /dev/null +++ b/docs/deployment/config.md @@ -0,0 +1,9 @@ +--- +title: 配置 +icon: object-group +order: 2 +category: 使用指南 +tag: + - 配置 + - 部署 +--- diff --git a/docs/deployment/install.md b/docs/deployment/install.md new file mode 100644 index 0000000..ea1b9f8 --- /dev/null +++ b/docs/deployment/install.md @@ -0,0 +1,14 @@ +--- +title: 安装 +icon: object-group +order: 1 +category: 使用指南 +tag: + - 安装 +--- + +1. 安装 `Git` 和 `Python3.10+` 环境 +2. 克隆项目 `git clone https://github.com/snowykami/LiteyukiBot` (无法连接可以用`https://gitee.com/snowykami/LiteyukiBot`) +3. 切换目录`cd LiteyukiBot` +4. 安装依赖`pip install -r requirements.txt`(如果多个Python环境请指定后安装`pythonx -m pip install -r requirements.txt`) +5. 启动`python main.py` diff --git a/docs/guide/README.md b/docs/guide/README.md deleted file mode 100644 index ceb99ed..0000000 --- a/docs/guide/README.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: 指南 -icon: lightbulb ---- - -## 功能亮点 - -### Bar - -- [baz](bar/baz.md) -- ... - -### Foo - -- [ray](foo/ray.md) -- ... diff --git a/docs/guide/bar/README.md b/docs/guide/bar/README.md deleted file mode 100644 index dbfeccd..0000000 --- a/docs/guide/bar/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Bar 功能 -icon: lightbulb ---- - -## 介绍 - -我们支持 bar 功能,... - -## 详情 - -- [baz](baz.md) -- ... diff --git a/docs/guide/bar/baz.md b/docs/guide/bar/baz.md deleted file mode 100644 index 279514c..0000000 --- a/docs/guide/bar/baz.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Baz -icon: circle-info ---- - -功能详情... diff --git a/docs/guide/foo/README.md b/docs/guide/foo/README.md deleted file mode 100644 index d99a74f..0000000 --- a/docs/guide/foo/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Foo 功能 -icon: lightbulb ---- - -## 介绍 - -我们支持 foo 功能,... - -## 详情 - -- [ray](ray.md) -- ... diff --git a/docs/guide/foo/ray.md b/docs/guide/foo/ray.md deleted file mode 100644 index d4cbb58..0000000 --- a/docs/guide/foo/ray.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Ray -icon: circle-info ---- - -功能详情... diff --git a/docs/usage/README.md b/docs/usage/README.md new file mode 100644 index 0000000..cec4fce --- /dev/null +++ b/docs/usage/README.md @@ -0,0 +1,6 @@ +--- +title: 使用指南 +index: false +icon: laptop-code +category: 使用指南 +---