mirror of
				https://github.com/LiteyukiStudio/LiteyukiBot.git
				synced 2025-11-04 00:36:26 +00:00 
			
		
		
		
	docs: 资源包相关内容
This commit is contained in:
		@@ -20,12 +20,6 @@ actions:
 | 
				
			|||||||
    icon: book
 | 
					    icon: book
 | 
				
			||||||
    link: ./usage/basic_command.html
 | 
					    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:
 | 
					highlights:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - header: 简洁至上
 | 
					  - header: 简洁至上
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										37
									
								
								docs/usage/resource_pack.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								docs/usage/resource_pack.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					title: 资源包
 | 
				
			||||||
 | 
					icon: comment
 | 
				
			||||||
 | 
					order: 3
 | 
				
			||||||
 | 
					category: 使用手册
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 简介 
 | 
				
			||||||
 | 
					资源包,也可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源码
 | 
				
			||||||
 | 
					- 资源/主题商店提供了一些资源包供你选择,你也可以自己制作资源包
 | 
				
			||||||
 | 
					- 资源包的制作很简单,如果你接触过`Minecraft`的资源包,那么你会很快上手
 | 
				
			||||||
 | 
					- 部分内容制作需要一点点前端基础,例如`html`,`css`,如果你不懂,可以参考一些教程
 | 
				
			||||||
 | 
					- 欢迎各位投稿资源包到轻雪资源商店
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 加载资源包
 | 
				
			||||||
 | 
					- 下载的资源包通常是以`.zip`格式压缩的,你只需要将其解压到根目录`resources`目录下即可,注意不要嵌套文件夹,正常的路径应该是这样的
 | 
				
			||||||
 | 
					```shell
 | 
				
			||||||
 | 
					main.py
 | 
				
			||||||
 | 
					resources
 | 
				
			||||||
 | 
					├─resource_pack_1
 | 
				
			||||||
 | 
					    ├───metadata.yml
 | 
				
			||||||
 | 
					    ├───templates
 | 
				
			||||||
 | 
					    └───...
 | 
				
			||||||
 | 
					└─resource_pack_2
 | 
				
			||||||
 | 
					    ├───metadata.yml
 | 
				
			||||||
 | 
					    └───...
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					- 你自己制作的资源包也应该遵循这个规则,并且应该在`metadata.yml`中填写一些信息
 | 
				
			||||||
 | 
					- 若没有`metadata.yml`文件,则轻雪不会加载这个资源包
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					name: "资源包名称"
 | 
				
			||||||
 | 
					version: "1.0.0"
 | 
				
			||||||
 | 
					description: "资源包描述"
 | 
				
			||||||
 | 
					... # 你可以自定义一些信息,但请保证以上三个字段
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					- 资源包加载遵循一个优先级,即后加载的资源包会覆盖前面的资源包,也就是说,你在A资源包中定义了一个`index.html`文件,B资源包也定义了一个`index.html`文件,那么加载B资源包后,A资源包中的`index.html`文件会被覆盖
 | 
				
			||||||
 | 
					- 对于不同资源包的不同文件,是可以相对引用的,例如你在A资源包中的`index.html`文件中引用了B资源包中的`style.css`文件,那么加载A资源包后,轻雪会自动加载B资源包中的`style.css`文件
 | 
				
			||||||
		Reference in New Issue
	
	Block a user