📝 更新开发规范

This commit is contained in:
远野千束 2024-09-04 02:43:44 +08:00
parent d1b887fcaa
commit b4b931fc95
7 changed files with 71 additions and 6 deletions

View File

@ -0,0 +1,26 @@
<script setup lang="ts">
import {getTextRef} from "./scripts/i18n";
import {repoPath, repoURL} from "./scripts/const";
const contributorImgSrc = `https://contrib.rocks/image?repo=${repoPath}`
const contributorsUrl = `${repoURL}/graphs/contributors`
</script>
<template>
<div class="contributor-bar">
<h2>{{ getTextRef('thx_contributors') }}</h2>
<a :href="contributorsUrl">
<div class="contributor-list">
<img :src=contributorImgSrc alt="Contributors">
</div>
</a>
</div>
</template>
<style scoped>
.contributor-bar {
display: flex;
flex-direction: column;
align-items: center;
}
</style>

View File

@ -133,7 +133,8 @@ onBeforeRouteUpdate(() => {
</div> </div>
</div> </div>
<div class="starmap"> <div class="starmap">
<iframe src="https://starmap.liteyuki.icu/" width="100%" height="300px" class="gamma"></iframe> <iframe src="https://starmap.liteyuki.icu/" width="100%" height="300px" class="gamma">
</iframe>
</div> </div>
</div> </div>
</div> </div>
@ -267,7 +268,7 @@ onBeforeRouteUpdate(() => {
.stats-info { .stats-info {
width: 40%; width: 40%;
margin: 30px; margin: 10px 30px 30px 30px;
} }
.starmap { .starmap {

View File

@ -0,0 +1,11 @@
<script setup lang="ts">
</script>
<template>
</template>
<style scoped>
</style>

View File

@ -0,0 +1,4 @@
export const platformBaseURL = "https://github.com/"
export const repoPath = "LiteyukiStudio/LiteyukiBot"
export const repoURL = `${platformBaseURL}${repoPath}`

View File

@ -22,6 +22,8 @@ const i18nData = {
liteyukiOnly: 'Liteyuki Only', liteyukiOnly: 'Liteyuki Only',
search: 'Search', search: 'Search',
resourceStore: 'Resources Store', resourceStore: 'Resources Store',
thx_contributors: 'Thanks the following contributors!',
}, },
zh: { zh: {
stats: '统计信息', stats: '统计信息',
@ -43,6 +45,8 @@ const i18nData = {
liteyukiOnly: '仅轻雪', liteyukiOnly: '仅轻雪',
search: '搜索', search: '搜索',
resourceStore: '资源商店', resourceStore: '资源商店',
thx_contributors: '感谢以下贡献者!',
} }
} }

View File

@ -2,6 +2,12 @@
title: Development Guide title: Development Guide
order: 0 order: 0
--- ---
<script setup>
import ContributorBar from '../../components/ContributorBar.vue'
</script>
# Development Guide # Development Guide
## How to Develop ## How to Develop
@ -52,8 +58,8 @@ The `src` directory is the application part, please develop business logic in th
- commit message should follow the following guidelines: - commit message should follow the following guidelines:
- You should commit the code after completing a feature or fixing a bug, and not mix the code of multiple features or bugs together. - You should commit the code after completing a feature or fixing a bug, and not mix the code of multiple features or bugs together.
- We use gitmoji to mark the type of commit, such as `:sparkles:` for introducing new features, `:bug:` for fixing bugs, etc., please refer to [gitmoji](https://gitmoji.dev/) for details. - We use gitmoji to mark the type of commit, such as `:sparkles:` for introducing new features, `:bug:` for fixing bugs, etc., please refer to [gitmoji](https://gitmoji.dev/) for details.
- The format of the commit message is `<emoji> [module]: <message>`, such as `:sparkles: [liteyuki.event]: add new feature`, - The format of the commit message is `<emoji> [type:] <message>`, such as `:sparkles: feat: add new field to event`,
where the module field is the affected part, such as `liteyuki.message`, `docs.en.guide.md`, etc., not much is required, but please fill in as much as possible; the message field is a brief description, in summary, what you did. where the type field is the type of commit, not much is required, but please fill in as much as possible; the message field is a brief description, in summary, what you did.
- There is no restriction on the language of the commit message, and bilingual use is possible if conditions permit. - There is no restriction on the language of the commit message, and bilingual use is possible if conditions permit.
- The documentation should follow [`Markdown`](https://www.markdownguide.org/) syntax and support vitepress-related content: - The documentation should follow [`Markdown`](https://www.markdownguide.org/) syntax and support vitepress-related content:
- Revise the documentation for each language when editing. - Revise the documentation for each language when editing.
@ -62,3 +68,6 @@ The `src` directory is the application part, please develop business logic in th
## Finally ## Finally
- This project is a non-profit open-source project, and we welcome anyone to participate in development. Your contributions will make Liteyuki better. - This project is a non-profit open-source project, and we welcome anyone to participate in development. Your contributions will make Liteyuki better.
<ContributorBar />

View File

@ -2,6 +2,13 @@
title: 开发指南 title: 开发指南
order: 0 order: 0
--- ---
<script setup>
import ContributorBar from '../../components/ContributorBar.vue'
</script>
# 开发指南 # 开发指南
## 如何开发 ## 如何开发
@ -49,8 +56,8 @@ order: 0
- commit message请遵循以下规范 - commit message请遵循以下规范
- 应在每次完成一个功能或修复一个bug后提交代码不要将多个功能或多个bug的代码混在一起提交。 - 应在每次完成一个功能或修复一个bug后提交代码不要将多个功能或多个bug的代码混在一起提交。
- 我们使用gitmoji来标记commit的类型如`:sparkles:`表示引入新功能,`:bug:`表示修复bug等具体请参考[gitmoji](https://gitmoji.dev/) - 我们使用gitmoji来标记commit的类型如`:sparkles:`表示引入新功能,`:bug:`表示修复bug等具体请参考[gitmoji](https://gitmoji.dev/)
- commit message的格式为`<emoji> [module]: <message>`,如`:sparkles: [liteyuki.event]: add new feature` - commit message的格式为`<emoji> [type:] <message>`,如`:sparkles: feat: 给event添加新字段`
其中module字段为受影响部分例如`liteyuki.message``docs.en.guide.md`等,不作过多要求,但请尽量填写;message字段为简短的描述总结来说就是你干了什么。 其中`type`字段为commit类型且**可选**message字段为简短的描述总结来说就是你干了什么。
- 不限制commit message的语言有条件可以使用中英双语。 - 不限制commit message的语言有条件可以使用中英双语。
- 文档请遵循[`Markdown`](https://www.markdownguide.org/)语法并且支持vitepress相关内容 - 文档请遵循[`Markdown`](https://www.markdownguide.org/)语法并且支持vitepress相关内容
- 修订文档时,每个语言的文档都要修订。 - 修订文档时,每个语言的文档都要修订。
@ -59,3 +66,6 @@ order: 0
## 最后 ## 最后
- 本项目是一个非盈利的开源项目,我们欢迎任何人参与开发,你的贡献将会使轻雪变得更好。 - 本项目是一个非盈利的开源项目,我们欢迎任何人参与开发,你的贡献将会使轻雪变得更好。
<ContributorBar />