forked from bot/app
🐛 文档构建失败的问题
This commit is contained in:
parent
66ade9efc6
commit
ee851116d8
@ -18,3 +18,4 @@ export default defineClientConfig({
|
|||||||
// app.use(ElementPlus);
|
// app.use(ElementPlus);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -9,18 +9,25 @@ export default defineUserConfig({
|
|||||||
"/": {
|
"/": {
|
||||||
// 设置正在使用的语言
|
// 设置正在使用的语言
|
||||||
lang: "zh-CN",
|
lang: "zh-CN",
|
||||||
|
title: "LiteyukiBot 轻雪机器人",
|
||||||
|
description: "LiteyukiBot | 轻雪机器人 | An OneBot Standard ChatBot | 一个OneBot标准的聊天机器人",
|
||||||
|
head: [
|
||||||
|
["script", {"src": "/js/zh/get_data.js", "type": "module"}],
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"/en/": {
|
"/en/": {
|
||||||
// 设置正在使用的语言
|
// 设置正在使用的语言
|
||||||
lang: "en-US",
|
lang: "en-US",
|
||||||
|
title: "LiteyukiBot",
|
||||||
|
description: "LiteyukiBot | An OneBot Standard ChatBot ",
|
||||||
|
head: [
|
||||||
|
["script", {"src": "/js/en/get_data.js", "type": "module"}],
|
||||||
|
]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
title: "LiteyukiBot 轻雪机器人",
|
|
||||||
description: "LiteyukiBot | 轻雪机器人 | An OneBot Standard ChatBot | 一个OneBot标准的聊天机器人",
|
|
||||||
head: [
|
head: [
|
||||||
// 设置 favor.ico,.vuepress/public 下
|
// 设置 favor.ico,.vuepress/public 下
|
||||||
["script", {src: "/js/style.js", "type": "module"}],
|
["script", {src: "/js/style.js", "type": "module"}],
|
||||||
["script", {src: "/js/get_data.js", "type": "module"}],
|
|
||||||
['link', {rel: 'icon', href: 'https://cdn.liteyuki.icu/favicon.ico'},],
|
['link', {rel: 'icon', href: 'https://cdn.liteyuki.icu/favicon.ico'},],
|
||||||
|
|
||||||
['link', {rel: 'stylesheet', href: 'https://cdn.bootcdn.net/ajax/libs/firacode/6.2.0/fira_code.min.css'}],
|
['link', {rel: 'stylesheet', href: 'https://cdn.bootcdn.net/ajax/libs/firacode/6.2.0/fira_code.min.css'}],
|
||||||
|
25
docs/.vuepress/navbar/en.ts
Normal file
25
docs/.vuepress/navbar/en.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import {navbar} from "vuepress-theme-hope";
|
||||||
|
|
||||||
|
export const enNavbarConfig = navbar([
|
||||||
|
"/en/",
|
||||||
|
{
|
||||||
|
text: "Deploy",
|
||||||
|
link: "/en/deploy/",
|
||||||
|
prefix: "deploy/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Usage",
|
||||||
|
link: "/en/usage/",
|
||||||
|
prefix: "usage/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Extensions",
|
||||||
|
link: "/en/store/",
|
||||||
|
prefix: "store/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Contribute",
|
||||||
|
link: "/en/dev/",
|
||||||
|
prefix: "dev/",
|
||||||
|
},
|
||||||
|
]);
|
2
docs/.vuepress/navbar/index.ts
Normal file
2
docs/.vuepress/navbar/index.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export * from "./zh.js"
|
||||||
|
export * from "./en.js"
|
@ -1,11 +1,12 @@
|
|||||||
|
|
||||||
import {navbar} from "vuepress-theme-hope";
|
import {navbar} from "vuepress-theme-hope";
|
||||||
|
|
||||||
export default navbar([
|
export const zhNavbarConfig = navbar([
|
||||||
"/",
|
"/",
|
||||||
{
|
{
|
||||||
text: "安装及部署",
|
text: "安装及部署",
|
||||||
link: "/deployment/",
|
link: "/deploy/",
|
||||||
prefix: "deployment/",
|
prefix: "deploy/",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "使用及功能",
|
text: "使用及功能",
|
||||||
@ -21,5 +22,5 @@ export default navbar([
|
|||||||
text: "开发及贡献",
|
text: "开发及贡献",
|
||||||
link: "/dev/",
|
link: "/dev/",
|
||||||
prefix: "dev/",
|
prefix: "dev/",
|
||||||
}
|
},
|
||||||
]);
|
]);
|
73
docs/.vuepress/public/js/en/get_data.js
Normal file
73
docs/.vuepress/public/js/en/get_data.js
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
// 定义全局变量来存储数据
|
||||||
|
|
||||||
|
let globalTotal = 0;
|
||||||
|
|
||||||
|
let globalOnline = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// 从API获取数据并更新全局变量
|
||||||
|
|
||||||
|
function fetchAndUpdateData() {
|
||||||
|
|
||||||
|
Promise.all([
|
||||||
|
|
||||||
|
fetch("https://api.liteyuki.icu/count").then(res => res.json()),
|
||||||
|
|
||||||
|
fetch("https://api.liteyuki.icu/online").then(res => res.json())
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
.then(([countRes, onlineRes]) => {
|
||||||
|
|
||||||
|
globalTotal = countRes.register;
|
||||||
|
|
||||||
|
globalOnline = onlineRes.online;
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
.catch(err => {
|
||||||
|
|
||||||
|
console.error("Error fetching data:", err);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 更新页面显示,使用全局变量中的数据
|
||||||
|
|
||||||
|
function updatePageDisplay() {
|
||||||
|
|
||||||
|
let countInfo = document.getElementById("count-info");
|
||||||
|
|
||||||
|
if (!countInfo) {
|
||||||
|
|
||||||
|
let info = `<div id="count-info" style="text-align: center; font-size: 20px; font-weight: 500">
|
||||||
|
|
||||||
|
Instances:<span id="total">${globalTotal}</span> Online:<span id="online">${globalOnline}</span></div>`;
|
||||||
|
|
||||||
|
let mainDescription = document.querySelector("#main-description");
|
||||||
|
|
||||||
|
if (mainDescription) {
|
||||||
|
|
||||||
|
mainDescription.insertAdjacentHTML('afterend', info);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 初始调用更新数据
|
||||||
|
|
||||||
|
fetchAndUpdateData();
|
||||||
|
|
||||||
|
updatePageDisplay();
|
||||||
|
|
||||||
|
|
||||||
|
// 设置定时器,分别以不同频率调用更新数据和更新页面的函数
|
||||||
|
|
||||||
|
setInterval(fetchAndUpdateData, 10000); // 每10秒更新一次数据
|
||||||
|
|
||||||
|
setInterval(updatePageDisplay, 1000); // 每1秒更新一次页面显示
|
@ -1,39 +1,73 @@
|
|||||||
// 定义全局变量来存储数据
|
// 定义全局变量来存储数据
|
||||||
|
|
||||||
let globalTotal = 0;
|
let globalTotal = 0;
|
||||||
|
|
||||||
let globalOnline = 0;
|
let globalOnline = 0;
|
||||||
|
|
||||||
|
|
||||||
// 从API获取数据并更新全局变量
|
// 从API获取数据并更新全局变量
|
||||||
|
|
||||||
function fetchAndUpdateData() {
|
function fetchAndUpdateData() {
|
||||||
|
|
||||||
Promise.all([
|
Promise.all([
|
||||||
|
|
||||||
fetch("https://api.liteyuki.icu/count").then(res => res.json()),
|
fetch("https://api.liteyuki.icu/count").then(res => res.json()),
|
||||||
|
|
||||||
fetch("https://api.liteyuki.icu/online").then(res => res.json())
|
fetch("https://api.liteyuki.icu/online").then(res => res.json())
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
.then(([countRes, onlineRes]) => {
|
.then(([countRes, onlineRes]) => {
|
||||||
|
|
||||||
globalTotal = countRes.register;
|
globalTotal = countRes.register;
|
||||||
|
|
||||||
globalOnline = onlineRes.online;
|
globalOnline = onlineRes.online;
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
|
||||||
console.error("Error fetching data:", err);
|
console.error("Error fetching data:", err);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 更新页面显示,使用全局变量中的数据
|
// 更新页面显示,使用全局变量中的数据
|
||||||
|
|
||||||
function updatePageDisplay() {
|
function updatePageDisplay() {
|
||||||
|
|
||||||
let countInfo = document.getElementById("count-info");
|
let countInfo = document.getElementById("count-info");
|
||||||
|
|
||||||
if (!countInfo) {
|
if (!countInfo) {
|
||||||
|
|
||||||
let info = `<div id="count-info" style="text-align: center; font-size: 20px; font-weight: 500">
|
let info = `<div id="count-info" style="text-align: center; font-size: 20px; font-weight: 500">
|
||||||
|
|
||||||
全球实例:<span id="total">${globalTotal}</span> 当前在线:<span id="online">${globalOnline}</span></div>`;
|
全球实例:<span id="total">${globalTotal}</span> 当前在线:<span id="online">${globalOnline}</span></div>`;
|
||||||
|
|
||||||
let mainDescription = document.querySelector("#main-description");
|
let mainDescription = document.querySelector("#main-description");
|
||||||
|
|
||||||
if (mainDescription) {
|
if (mainDescription) {
|
||||||
|
|
||||||
mainDescription.insertAdjacentHTML('afterend', info);
|
mainDescription.insertAdjacentHTML('afterend', info);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 初始调用更新数据
|
// 初始调用更新数据
|
||||||
|
|
||||||
fetchAndUpdateData();
|
fetchAndUpdateData();
|
||||||
|
|
||||||
updatePageDisplay();
|
updatePageDisplay();
|
||||||
|
|
||||||
|
|
||||||
// 设置定时器,分别以不同频率调用更新数据和更新页面的函数
|
// 设置定时器,分别以不同频率调用更新数据和更新页面的函数
|
||||||
|
|
||||||
setInterval(fetchAndUpdateData, 10000); // 每10秒更新一次数据
|
setInterval(fetchAndUpdateData, 10000); // 每10秒更新一次数据
|
||||||
|
|
||||||
setInterval(updatePageDisplay, 1000); // 每1秒更新一次页面显示
|
setInterval(updatePageDisplay, 1000); // 每1秒更新一次页面显示
|
31
docs/.vuepress/sidebar/en.ts
Normal file
31
docs/.vuepress/sidebar/en.ts
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import {sidebar} from "vuepress-theme-hope";
|
||||||
|
|
||||||
|
export const enSidebarConfig = sidebar({
|
||||||
|
"/en/": [
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
text: "Install & Deploy",
|
||||||
|
icon: "laptop-code",
|
||||||
|
prefix: "deploy/",
|
||||||
|
children: "structure",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Usage & Features",
|
||||||
|
icon: "book",
|
||||||
|
prefix: "usage/",
|
||||||
|
children: "structure",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Resources & Plugins",
|
||||||
|
icon: "store",
|
||||||
|
prefix: "store/",
|
||||||
|
children: "structure",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Development & Contribution",
|
||||||
|
icon: "pen-nib",
|
||||||
|
prefix: "dev/",
|
||||||
|
children: "structure",
|
||||||
|
}
|
||||||
|
],
|
||||||
|
});
|
2
docs/.vuepress/sidebar/index.ts
Normal file
2
docs/.vuepress/sidebar/index.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export * from "./zh.js"
|
||||||
|
export * from "./en.js"
|
@ -1,12 +1,12 @@
|
|||||||
import {sidebar} from "vuepress-theme-hope";
|
import {sidebar} from "vuepress-theme-hope";
|
||||||
|
|
||||||
export default sidebar({
|
export const zhSidebarConfig = sidebar({
|
||||||
"/": [
|
"/": [
|
||||||
"",
|
"",
|
||||||
{
|
{
|
||||||
text: "安装及部署",
|
text: "安装及部署",
|
||||||
icon: "laptop-code",
|
icon: "laptop-code",
|
||||||
prefix: "deployment/",
|
prefix: "deploy/",
|
||||||
children: "structure",
|
children: "structure",
|
||||||
},
|
},
|
||||||
{
|
{
|
@ -1,14 +1,29 @@
|
|||||||
import {hopeTheme} from "vuepress-theme-hope";
|
import {hopeTheme} from "vuepress-theme-hope";
|
||||||
import navbar from "./navbar.js";
|
import {enSidebarConfig, zhSidebarConfig} from "./sidebar/index.js";
|
||||||
import sidebar from "./sidebar.js";
|
import {enNavbarConfig, zhNavbarConfig} from "./navbar/index.js";
|
||||||
|
|
||||||
export default hopeTheme({
|
export default hopeTheme({
|
||||||
|
|
||||||
hostname: "https://vuepress-theme-hope-docs-demo.netlify.app",
|
hostname: "https://vuepress-theme-hope-docs-demo.netlify.app",
|
||||||
|
|
||||||
author: {
|
locales: {
|
||||||
name: "远野千束",
|
"/": {
|
||||||
url: "https://sfkm.me",
|
navbar: zhNavbarConfig,
|
||||||
|
sidebar: zhSidebarConfig,
|
||||||
|
author: {
|
||||||
|
name: "远野千束",
|
||||||
|
url: "https://sfkm.me",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/en/": {
|
||||||
|
navbar: enNavbarConfig,
|
||||||
|
sidebar: enSidebarConfig,
|
||||||
|
author: {
|
||||||
|
name: "SnowyKami",
|
||||||
|
url: "https://sfkm.me",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
iconAssets: "fontawesome-with-brands",
|
iconAssets: "fontawesome-with-brands",
|
||||||
@ -19,12 +34,6 @@ export default hopeTheme({
|
|||||||
|
|
||||||
docsDir: "docs",
|
docsDir: "docs",
|
||||||
|
|
||||||
// 导航栏
|
|
||||||
navbar,
|
|
||||||
|
|
||||||
// 侧边栏
|
|
||||||
sidebar,
|
|
||||||
|
|
||||||
// 页脚
|
// 页脚
|
||||||
footer: "LiteyukiBot",
|
footer: "LiteyukiBot",
|
||||||
displayFooter: true,
|
displayFooter: true,
|
@ -79,5 +79,4 @@ highlights:
|
|||||||
details: 如果你有多个 Python 环境,请使用 <code>pythonx -m pip install -r requirements.txt</code>。
|
details: 如果你有多个 Python 环境,请使用 <code>pythonx -m pip install -r requirements.txt</code>。
|
||||||
- title: 使用 <code>python main.py</code> 启动项目。
|
- title: 使用 <code>python main.py</code> 启动项目。
|
||||||
copyright: © 2021-2024 SnowyKami All Rights Reserved
|
copyright: © 2021-2024 SnowyKami All Rights Reserved
|
||||||
|
|
||||||
---
|
---
|
@ -1,86 +0,0 @@
|
|||||||
---
|
|
||||||
home: true
|
|
||||||
icon: home
|
|
||||||
title: 首页
|
|
||||||
heroImage: https://cdn.liteyuki.icu/static/img/logo.png
|
|
||||||
bgImage:
|
|
||||||
bgImageDark:
|
|
||||||
bgImageStyle:
|
|
||||||
background-attachment: fixed
|
|
||||||
heroText: LiteyukiBot
|
|
||||||
tagline: 轻雪机器人,一个以轻量和简洁为设计理念基于Nonebot2的OneBot标准聊天机器人
|
|
||||||
|
|
||||||
actions:
|
|
||||||
- text: 快速部署
|
|
||||||
icon: lightbulb
|
|
||||||
link: ./deployment/install.html
|
|
||||||
type: primary
|
|
||||||
|
|
||||||
- text: 使用手册
|
|
||||||
icon: book
|
|
||||||
link: ./usage/basic_command.html
|
|
||||||
|
|
||||||
highlights:
|
|
||||||
|
|
||||||
- header: 简洁至上
|
|
||||||
image: /assets/image/layout.svg
|
|
||||||
bgImage: https://theme-hope-assets.vuejs.press/bg/2-light.svg
|
|
||||||
bgImageDark: https://theme-hope-assets.vuejs.press/bg/2-dark.svg
|
|
||||||
bgImageStyle:
|
|
||||||
background-repeat: repeat
|
|
||||||
background-size: initial
|
|
||||||
features:
|
|
||||||
- title: 基于Nonebot2
|
|
||||||
icon: robot
|
|
||||||
details: 拥有良好的生态支持
|
|
||||||
link: https://nonebot.dev/
|
|
||||||
|
|
||||||
- title: 便捷插件管理
|
|
||||||
icon: plug
|
|
||||||
details: 使用<code>包管理器</code>,无需命令行操作即可安装/卸载插件
|
|
||||||
|
|
||||||
- title: 人性化交互
|
|
||||||
icon: mouse-pointer
|
|
||||||
details: 新的点击交互模式,拒绝手打指令
|
|
||||||
|
|
||||||
- title: 主题支持
|
|
||||||
icon: paint-brush
|
|
||||||
details: 使用资源包对外观进行完全自定义
|
|
||||||
link: https://bot.liteyuki.icu/usage/resource_pack.html
|
|
||||||
|
|
||||||
- title: 国际化
|
|
||||||
icon: globe
|
|
||||||
details: 通过资源包支持多种语言
|
|
||||||
link: https://baike.baidu.com/item/i18n/6771940
|
|
||||||
|
|
||||||
- title: 简易配置
|
|
||||||
icon: cog
|
|
||||||
details: 无需繁琐前期过程,开箱即用
|
|
||||||
link: https://bot.liteyuki.icu/deployment/config.html
|
|
||||||
|
|
||||||
- title: 高性能
|
|
||||||
icon: tachometer-alt
|
|
||||||
details: 500个插件,3s内启动
|
|
||||||
|
|
||||||
- title: 滚动更新
|
|
||||||
icon: cloud-download
|
|
||||||
details: 让你的机器人保持最新提交
|
|
||||||
|
|
||||||
- title: 开源
|
|
||||||
icon: code
|
|
||||||
details: 项目遵循MIT协议开源,欢迎各位的贡献
|
|
||||||
|
|
||||||
- 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
|
|
||||||
highlights:
|
|
||||||
- title: 安装 Git 和 Python3.10+
|
|
||||||
- title: 使用 <code>git clone https://github.com/snowykami/LiteyukiBot</code> 以克隆项目至本地。
|
|
||||||
details: 如果无法连接到GitHub,可以使用 <code>git clone https://gitee.com/snowykami/LiteyukiBot</code>。
|
|
||||||
- title: 使用 <code>cd LiteyukiBot</code> 切换到项目目录。
|
|
||||||
- title: 使用 <code>pip install -r requirements.txt</code> 安装项目依赖。
|
|
||||||
details: 如果你有多个 Python 环境,请使用 <code>pythonx -m pip install -r requirements.txt</code>。
|
|
||||||
- title: 使用 <code>python main.py</code> 启动项目。
|
|
||||||
copyright: © 2021-2024 SnowyKami All Rights Reserved
|
|
||||||
---
|
|
@ -30,54 +30,53 @@ highlights:
|
|||||||
background-repeat: repeat
|
background-repeat: repeat
|
||||||
background-size: initial
|
background-size: initial
|
||||||
features:
|
features:
|
||||||
- title: 支持多种框架
|
- title: Multi-Framework Support
|
||||||
icon: robot
|
icon: robot
|
||||||
details: 兼容nonebot,melobot等,拥有良好的生态支持
|
details: Compatible with nonebot, melobot, etc., with good ecological support
|
||||||
link: https://nonebot.dev/
|
link: https://nonebot.dev/
|
||||||
|
|
||||||
- title: 便捷管理
|
- title: Convenient Management
|
||||||
icon: plug
|
icon: plug
|
||||||
details: 使用包管理器,便捷管理插件及资源包
|
details: Use package manager to manage plugins and resource packs
|
||||||
|
|
||||||
- title: 主题支持
|
- title: Custom Themes Support
|
||||||
icon: paint-brush
|
icon: paint-brush
|
||||||
details: 使用资源包对外观进行完全自定义
|
details: Fully customize the appearance with resource packs
|
||||||
link: https://bot.liteyuki.icu/usage/resource_pack.html
|
link: https://bot.liteyuki.icu/usage/resource_pack.html
|
||||||
|
|
||||||
- title: 国际化
|
- title: i18n
|
||||||
icon: globe
|
icon: globe
|
||||||
details: 通过资源包支持多种语言
|
details: Support multiple languages through resource packs
|
||||||
link: https://baike.baidu.com/item/i18n/6771940
|
link: https://baike.baidu.com/item/i18n/6771940
|
||||||
|
|
||||||
- title: 简易使用
|
- title: Easy to Use
|
||||||
icon: cog
|
icon: cog
|
||||||
details: 无需繁琐前期过程,开箱即用
|
details: No need for cumbersome pre-processes, ready to use
|
||||||
link: https://bot.liteyuki.icu/deployment/config.html
|
link: https://bot.liteyuki.icu/deployment/config.html
|
||||||
|
|
||||||
- title: 超高性能
|
- title: High Performance
|
||||||
icon: tachometer-alt
|
icon: tachometer-alt
|
||||||
details: 500个插件,2s内启动
|
details: 500 plugins, start within 2s
|
||||||
|
|
||||||
- title: 滚动更新
|
- title: Rolling Update
|
||||||
icon: cloud-download
|
icon: cloud-download
|
||||||
details: 让你的机器人保持最新提交
|
details: Keep your bot up to date
|
||||||
|
|
||||||
- title: 开源项目
|
- title: OpenSource
|
||||||
icon: code
|
icon: code
|
||||||
details: 项目遵循MIT LICENCE开源,欢迎各位的贡献
|
details: MIT LICENCE open source project, welcome your contribution
|
||||||
|
|
||||||
- header: 快速部署
|
- header: Quick Start
|
||||||
image: /assets/image/box.svg
|
image: /assets/image/box.svg
|
||||||
bgImage: https://theme-hope-assets.vuejs.press/bg/3-light.svg
|
bgImage: https://theme-hope-assets.vuejs.press/bg/3-light.svg
|
||||||
bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg
|
bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg
|
||||||
highlights:
|
highlights:
|
||||||
- title: 安装 Git 及 Python3.10+
|
- title: Install Git and Python3.10+ environment
|
||||||
- title: 使用 <code>git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1</code> 以克隆项目至本地。
|
- title: Use <code>git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1</code> to clone the project locally
|
||||||
details: 如果无法连接到GitHub,可以使用 <code>git clone https://gitee.com/snowykami/LiteyukiBot --depth=1</code>。
|
- title: Use <code>cd LiteyukiBot</code> to change the directory to the project root
|
||||||
- title: 使用 <code>cd LiteyukiBot</code> 切换到项目目录。
|
- title: Use <code>pip install -r requirements.txt</code> install the project dependencies
|
||||||
- title: 使用 <code>pip install -r requirements.txt</code> 安装项目依赖。
|
details: If you have multiple Python environments, please use <code>pythonx -m pip install -r requirements.txt</code>.
|
||||||
details: 如果你有多个 Python 环境,请使用 <code>pythonx -m pip install -r requirements.txt</code>。
|
- title: Start bot with <code>python main.py</code>.
|
||||||
- title: 使用 <code>python main.py</code> 启动项目。
|
|
||||||
copyright: © 2021-2024 SnowyKami All Rights Reserved
|
copyright: © 2021-2024 SnowyKami All Rights Reserved
|
||||||
|
|
||||||
---
|
---
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 项目部署
|
title: Deploy
|
||||||
index: false
|
index: false
|
||||||
icon: laptop-code
|
icon: laptop-code
|
||||||
category: 部署
|
category: deploy
|
||||||
---
|
---
|
||||||
|
|
||||||
<Catalog />
|
<Catalog />
|
@ -1,11 +1,10 @@
|
|||||||
---
|
---
|
||||||
title: 配置
|
title: Configuration
|
||||||
icon: cog
|
icon: cog
|
||||||
order: 2
|
order: 2
|
||||||
category: 使用指南
|
category: deployment
|
||||||
tag:
|
tag:
|
||||||
- 配置
|
- Configuration
|
||||||
- 部署
|
|
||||||
---
|
---
|
||||||
|
|
||||||
轻雪支持`yaml`、`json`和`toml`作为配置文件,取决于你个人的喜好
|
轻雪支持`yaml`、`json`和`toml`作为配置文件,取决于你个人的喜好
|
@ -1,11 +1,10 @@
|
|||||||
---
|
---
|
||||||
title: 答疑
|
title: FAQ
|
||||||
icon: question
|
icon: question
|
||||||
order: 3
|
order: 3
|
||||||
category: 使用指南
|
category: deployment
|
||||||
tag:
|
tag:
|
||||||
- 配置
|
- FAQ
|
||||||
- 部署
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## **常见问题**
|
## **常见问题**
|
61
docs/en/deploy/install.md
Normal file
61
docs/en/deploy/install.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
---
|
||||||
|
title: Installation
|
||||||
|
icon: download
|
||||||
|
order: 1
|
||||||
|
category: deployment
|
||||||
|
tag:
|
||||||
|
- 安装
|
||||||
|
---
|
||||||
|
|
||||||
|
## **Installation**
|
||||||
|
|
||||||
|
### **Conventional deployment**
|
||||||
|
|
||||||
|
1. Install [`Git`](https://git-scm.com/download/) and [`Python3.10+`](https://www.python.org/downloads/release/python-31010/) environment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone the project locally, --depth=1 to reduce the size of the cloned repository, this project updates depend on Git
|
||||||
|
git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
|
||||||
|
# change the directory to the project root
|
||||||
|
cd LiteyukiBot
|
||||||
|
# install the project dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
# start bot
|
||||||
|
python main.py
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> Recommended to use `venv` to run Liteyuki to avoid dependency conflicts, you can use `python -m venv .venv` to create a virtual environment, and then use `.venv\Scripts\activate` to activate the virtual environment (use `source .venv/bin/activate` to activate on Linux)
|
||||||
|
|
||||||
|
### **Use docker**
|
||||||
|
|
||||||
|
1. Install [`Docker`](https://docs.docker.com/get-docker/)
|
||||||
|
2. Clone project repo `git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1`
|
||||||
|
3. change directory `cd LiteyukiBot`
|
||||||
|
4. build image with `docker build -t liteyukibot .`
|
||||||
|
5. start container `docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot`
|
||||||
|
|
||||||
|
> [!tip]
|
||||||
|
> For Windows, please use the absolute project directory `/path/to/LiteyukiBot` instead of $(pwd)
|
||||||
|
>
|
||||||
|
> If you have changed the port number, replace `20216` in `20216:20216` with your port number
|
||||||
|
|
||||||
|
### **Use TRSS Scripts**
|
||||||
|
[TRSS_Liteyuki LiteyukiBot manage script](https://timerainstarsky.github.io/TRSS_Liteyuki/), This feature is supported by TRSS and is not an official feature of LiteyukiBot. It is recommended to use Arch Linux.
|
||||||
|
|
||||||
|
|
||||||
|
## **Device requirements**
|
||||||
|
|
||||||
|
- Minimum Windows system version: `Windows 10+` / `Windows Server 2019+`
|
||||||
|
- Linux systems need to support Python 3.10+, with `Ubuntu 20.04+` recommended
|
||||||
|
- CPU: `1 vCPU` and more(Bot is multi processes, the more cores, the better the performance)
|
||||||
|
- Memory: Without other plugins, the Bot will occupy `300~500MB`, including processes like `chromium` and `node`. The memory occupied by other plugins depends on the specific plugins, and it is recommended to have more than `1GB`.
|
||||||
|
- Storage: At least `1GB` of space is required.
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> If there are multiple environments on the device, please use `path/to/python -m pip install -r requirements.txt` to install dependencies, where `path/to/python` is the path to your Python executable.
|
||||||
|
|
||||||
|
> [!warning]
|
||||||
|
> The update feature of Liteyuki depends on Git. If you have not installed Git and directly download the source code to run, you will not be able to use the update feature.
|
||||||
|
|
||||||
|
#### For other issues, please go to [Q&A](/deployment/fandq)
|
@ -1,60 +0,0 @@
|
|||||||
---
|
|
||||||
title: 安装
|
|
||||||
icon: download
|
|
||||||
order: 1
|
|
||||||
category: 使用指南
|
|
||||||
tag:
|
|
||||||
- 安装
|
|
||||||
---
|
|
||||||
|
|
||||||
## **开始安装**
|
|
||||||
|
|
||||||
### **常规部署**
|
|
||||||
|
|
||||||
1. 安装 [`Git`](https://git-scm.com/download/) 和 [`Python3.10+`](https://www.python.org/downloads/release/python-31010/) 环境
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 克隆项目到本地,轻雪使用Git进行版本管理,该步骤为必要项
|
|
||||||
git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1
|
|
||||||
# 切换到Bot目录下
|
|
||||||
cd LiteyukiBot
|
|
||||||
# 安装依赖
|
|
||||||
pip install -r requirements.txt
|
|
||||||
# 启动Bot
|
|
||||||
python main.py
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!tip]
|
|
||||||
> 推荐使用虚拟环境来运行轻雪,以避免依赖冲突,你可以使用`python -m venv .venv`来创建虚拟环境,然后使用`.venv\Scripts\activate`来激活虚拟环境(Linux下使用`source .venv/bin/activate`激活)
|
|
||||||
|
|
||||||
### **使用Docker构建镜像部署**
|
|
||||||
|
|
||||||
1. 安装 [`Docker`](https://docs.docker.com/get-docker/)
|
|
||||||
2. 克隆项目 `git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1`
|
|
||||||
3. 进入轻雪目录 `cd LiteyukiBot`
|
|
||||||
4. 构建镜像 `docker build -t liteyukibot .`
|
|
||||||
5. 启动容器 `docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot`
|
|
||||||
|
|
||||||
> [!tip]
|
|
||||||
> Windows请使用项目绝对目录`/path/to/LiteyukiBot`代替`$(pwd)` <br>
|
|
||||||
> 若你修改了端口号请将`20216:20216`中的`20216`替换为你的端口号
|
|
||||||
|
|
||||||
### **使用TRSS Scripts部署**
|
|
||||||
[TRSS_Liteyuki轻雪机器人管理脚本](https://timerainstarsky.github.io/TRSS_Liteyuki/),该功能由TRSS提供支持,不是LiteyukiBot官方提供的功能,推荐使用`Arch Linux`
|
|
||||||
|
|
||||||
|
|
||||||
## **设备要求**
|
|
||||||
|
|
||||||
- Windows系统版本最低`Windows10+`/`Windows Server 2019+`
|
|
||||||
- Linux系统要支持Python3.10+,推荐`Ubuntu 20.04+`(~~别用你那b CentOS~~)
|
|
||||||
- CPU: 至少`1vCPU`
|
|
||||||
- 内存: Bot无其他插件会占用`300~500MB`,包括`chromium` 及 `node`等进程,其他插件占用视具体插件而定,建议`1GB`以上
|
|
||||||
- 硬盘: 至少`1GB`空间
|
|
||||||
|
|
||||||
> [!warning]
|
|
||||||
> 如果设备上有多个环境,请使用`path/to/python -m pip install -r requirements.txt`来安装依赖,`path/to/python`为你的Python可执行文件路径
|
|
||||||
|
|
||||||
> [!warning]
|
|
||||||
> 轻雪的更新功能依赖Git,如果你没有安装Git直接下载源代码运行,你将无法使用更新功能
|
|
||||||
|
|
||||||
#### 其他问题请移步至[答疑](/deployment/fandq)
|
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: 开发及贡献
|
title: Contribute
|
||||||
index: false
|
index: false
|
||||||
icon: laptop-code
|
icon: laptop-code
|
||||||
category: 开发
|
category: 开发
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 进程通信
|
title: Communication
|
||||||
icon: exchange-alt
|
icon: exchange-alt
|
||||||
order: 4
|
order: 4
|
||||||
category: 开发
|
category: development
|
||||||
---
|
---
|
||||||
|
|
||||||
## **通道通信**
|
## **通道通信**
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 轻雪函数
|
title: Liteyuki Function
|
||||||
icon: code
|
icon: code
|
||||||
order: 2
|
order: 2
|
||||||
category: 开发
|
category: development
|
||||||
---
|
---
|
||||||
|
|
||||||
## **轻雪函数**
|
## **轻雪函数**
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 轻雪插件开发
|
title: Liteyuki Plugin
|
||||||
icon: laptop-code
|
icon: laptop-code
|
||||||
order: 3
|
order: 3
|
||||||
category: 开发
|
category: development
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 资源包开发
|
title: Resource Pack
|
||||||
icon: box
|
icon: box
|
||||||
order: 1
|
order: 1
|
||||||
category: 开发
|
category: development
|
||||||
---
|
---
|
||||||
|
|
||||||
## 简介
|
## 简介
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 资源及插件商店
|
title: Extensions Store
|
||||||
index: false
|
index: false
|
||||||
icon: store
|
icon: store
|
||||||
category: 商店
|
category: store
|
||||||
---
|
---
|
||||||
|
|
||||||
<Catalog />
|
<Catalog />
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 插件商店
|
title: Plugin Store
|
||||||
icon: plug
|
icon: plug
|
||||||
order: 2
|
order: 2
|
||||||
category: 使用手册
|
category: extension
|
||||||
---
|
---
|
||||||
|
|
||||||
<pluginStoreComp />
|
<pluginStoreComp />
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 资源商店
|
title: Resource Store
|
||||||
icon: box
|
icon: box
|
||||||
order: 1
|
order: 1
|
||||||
category: 使用手册
|
category: extension
|
||||||
---
|
---
|
||||||
|
|
||||||
<resourceStoreComp />
|
<resourceStoreComp />
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 使用手册
|
title: Usage
|
||||||
index: false
|
index: false
|
||||||
icon: laptop-code
|
icon: laptop-code
|
||||||
category: 使用手册
|
category: usage
|
||||||
---
|
---
|
||||||
|
|
||||||
<Catalog />
|
<Catalog />
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 用户协议
|
title: User Agreement
|
||||||
icon: user-secret
|
icon: user-secret
|
||||||
order: 3
|
order: 3
|
||||||
category: 使用手册
|
category: usage
|
||||||
---
|
---
|
||||||
|
|
||||||
1. 本项目遵循`MIT`协议,你可以自由使用,修改,分发,但是请保留原作者信息
|
1. 本项目遵循`MIT`协议,你可以自由使用,修改,分发,但是请保留原作者信息
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 基础命令
|
title: Basic Commands
|
||||||
icon: comment
|
icon: comment
|
||||||
order: 1
|
order: 1
|
||||||
category: 使用手册
|
category: usage
|
||||||
---
|
---
|
||||||
|
|
||||||
# 基础插件
|
# 基础插件
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: 功能命令
|
title: Extra Commands
|
||||||
icon: comment
|
icon: comment
|
||||||
order: 2
|
order: 2
|
||||||
category: 使用手册
|
category: usage
|
||||||
---
|
---
|
||||||
|
|
||||||
## 功能插件命令
|
## 功能插件命令
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
title: 轻雪API
|
|
||||||
icon: code
|
|
||||||
order: 5
|
|
||||||
category: 使用指南
|
|
||||||
tag:
|
|
||||||
- 配置
|
|
||||||
- 部署
|
|
||||||
---
|
|
||||||
|
|
||||||
## **轻雪API**
|
|
||||||
|
|
||||||
轻雪API是轻雪运行中部分服务的支持,由`go`语言编写,例如错误反馈,图床链接等,目前服务由轻雪服务器提供,用户无需额外部署
|
|
107
docs/foolsday.md
107
docs/foolsday.md
@ -1,107 +0,0 @@
|
|||||||
---
|
|
||||||
home: true
|
|
||||||
icon: home
|
|
||||||
title: 首页
|
|
||||||
heroImage: https://cdn.liteyuki.icu/static/img/lykwi.png
|
|
||||||
bgImage:
|
|
||||||
bgImageDark:
|
|
||||||
bgImageStyle:
|
|
||||||
background-attachment: fixed
|
|
||||||
heroText: HeavylavaBot666 # LiteyukiBot 6
|
|
||||||
tagline: 重浆机器人,一个以笨重和复杂为设计理念基于Koishi114514的TwoBotv1919810标准聊天机器人,可用于雪地清扫,使用Typethon编写
|
|
||||||
#tagline: 轻雪机器人,一个以轻量和简洁为设计理念基于Nonebot2的OneBot标准聊天机器人
|
|
||||||
# 泰普森(X
|
|
||||||
|
|
||||||
actions:
|
|
||||||
- text: 快速结束 # 快速开始
|
|
||||||
icon: lightbulb
|
|
||||||
link: ./deployment/install.html
|
|
||||||
type: primary
|
|
||||||
|
|
||||||
- text: 奇怪的册子 # 使用手册
|
|
||||||
icon: book
|
|
||||||
link: ./usage/basic_command.html
|
|
||||||
|
|
||||||
#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`
|
|
||||||
|
|
||||||
highlights:
|
|
||||||
|
|
||||||
- header: 简洁至下 # 简洁至上
|
|
||||||
image: /assets/image/layout.svg
|
|
||||||
bgImage: https://theme-hope-assets.vuejs.press/bg/2-light.svg
|
|
||||||
bgImageDark: https://theme-hope-assets.vuejs.press/bg/2-dark.svg
|
|
||||||
bgImageStyle:
|
|
||||||
background-repeat: repeat
|
|
||||||
background-size: initial
|
|
||||||
features:
|
|
||||||
- title: 基于Koishi.js233
|
|
||||||
icon: robot
|
|
||||||
details: 拥有辣鸡的生态支持
|
|
||||||
link: https://nonebot.dev/
|
|
||||||
|
|
||||||
- title: 盲目插件管理
|
|
||||||
icon: plug
|
|
||||||
details: 基于nbshi使用<code>xmpn和bib</code>,让你无法安装/卸载插件
|
|
||||||
|
|
||||||
- title: 纯命令行
|
|
||||||
icon: mouse-pointer
|
|
||||||
details: 老的掉牙的交互模式,必须手打指令
|
|
||||||
|
|
||||||
- title: 猪蹄支持
|
|
||||||
icon: paint-brush
|
|
||||||
details: 支持多种烤猪蹄样式,丢弃烤箱,拥抱烧烤架,满足你的干饭需求
|
|
||||||
|
|
||||||
- title: 去国际化
|
|
||||||
icon: globe
|
|
||||||
details: 支持多种语言,包括i18n部分语言和自行扩展的语言代码
|
|
||||||
link: https://baike.baidu.com/item/i18n/6771940
|
|
||||||
|
|
||||||
- title: 超难配置
|
|
||||||
icon: cog
|
|
||||||
details: 无需过多配置,开箱即用
|
|
||||||
link: https://bot.liteyuki.icu/deployment/config.html
|
|
||||||
|
|
||||||
- title: 高占用
|
|
||||||
icon: memory
|
|
||||||
details: 使用更多的意义不明的依赖和资源
|
|
||||||
|
|
||||||
- title: 一个Bot标准
|
|
||||||
icon: link
|
|
||||||
details: 支持OneBotv11/12标准的四种通信协议
|
|
||||||
link: https://onebot.dev/
|
|
||||||
|
|
||||||
- title: Alconna
|
|
||||||
icon: link
|
|
||||||
details: 使用Alconna实现低效命令解析
|
|
||||||
link: https://github.com/nonebot/plugin-alconna
|
|
||||||
|
|
||||||
- title: 不准更新
|
|
||||||
icon: cloud-download
|
|
||||||
details: 要更新自己写新版本去
|
|
||||||
|
|
||||||
- title: 服务支持
|
|
||||||
icon: server
|
|
||||||
details: 内置重浆API,但随时可能提桶跑路
|
|
||||||
|
|
||||||
- title: 闭源
|
|
||||||
icon: code
|
|
||||||
details: 要源代码自己逆向去
|
|
||||||
|
|
||||||
- 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
|
|
||||||
highlights:
|
|
||||||
- title: 安装 winget 和 nothing.js # git & node.js+
|
|
||||||
- title: 使用 <code>git clone https://github.com/snowykami/LiteyukiBot</code> 以克隆项目至FTP。 # 本地
|
|
||||||
details: 如果无法连接到PoonHub,可以使用 <code>git clone https://gitee.com/snowykami/LiteyukiBot</code>。
|
|
||||||
- title: 使用 <code>cd LiteyukiBot</code> 切换到项目目录。
|
|
||||||
- title: 使用 <code>npm install -r requirements.txt</code> 安装项目依赖。
|
|
||||||
details: 如果你有多个 nothing.js 环境,请使用 <code>pythonx -m npm install -r requirements.txt</code>。
|
|
||||||
- title: 使用 <code>node main.py</code> 启动项目。
|
|
||||||
copyright: © 2021-2024 SnowyKami All Rights Reserved
|
|
||||||
---
|
|
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
title: 轻雪API
|
|
||||||
icon: code
|
|
||||||
order: 5
|
|
||||||
category: 使用指南
|
|
||||||
tag:
|
|
||||||
- 配置
|
|
||||||
- 部署
|
|
||||||
---
|
|
||||||
|
|
||||||
## **轻雪API**
|
|
||||||
|
|
||||||
轻雪API是轻雪运行中部分服务的支持,由`go`语言编写,例如错误反馈,图床链接等,目前服务由轻雪服务器提供,用户无需额外部署
|
|
Loading…
Reference in New Issue
Block a user