LiteyukiBot/assets/dev_guide.md.9jVFvBLc.js

2 lines
3.7 KiB
JavaScript
Raw Normal View History

import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.BZiUP1E-.js";const p=JSON.parse('{"title":"开发指南","description":"","frontmatter":{"title":"开发指南","order":0},"headers":[],"relativePath":"dev/guide.md","filePath":"zh/dev/guide.md","lastUpdated":1725107025000}'),l={name:"dev/guide.md"},r=o('<h1 id="开发指南" tabindex="-1">开发指南 <a class="header-anchor" href="#开发指南" aria-label="Permalink to &quot;开发指南&quot;"></a></h1><h2 id="如何开发" tabindex="-1">如何开发 <a class="header-anchor" href="#如何开发" aria-label="Permalink to &quot;如何开发&quot;"></a></h2><p>插件开发无需阅读本文档,请阅读<a href="./plugin.html">插件开发文档</a>和<a href="./api/">API 引用</a>。</p><p>如需往轻雪仓库提交代码,请阅读以下内容:</p><ol><li>首先<a href="https://github.com/LiteyukiStudio/LiteyukiBot/fork" target="_blank" rel="noreferrer">fork</a>一份轻雪仓库到你的个人/组织账户下。</li><li>在你的仓库中进行开发。</li><li>在你的仓库中创建一个新的分支,将你的代码提交到这个分支。</li><li>在你的仓库中创建一个Pull Request将你的分支合并到轻雪仓库的<code>main</code>分支。</li></ol><p>参与开发默认你已经了解Python语言和轻雪框架的基本使用方法如果是文档相关的开发请确保你了解Markdown语法和基本前端知识。 出现冲突请与仓库维护者联系。</p><h3 id="建议" tabindex="-1">建议 <a class="header-anchor" href="#建议" aria-label="Permalink to &quot;建议&quot;"></a></h3><ul><li>开发过程中可以使用<code>mypy</code>, <code>flake8</code>, <code>black</code>等工具进行代码检查和格式化。</li><li>启用开发者模式,可以在<code>config.yml</code>中设置<code>dev_mode: true</code>,这样可以在控制台看到更多的调试信息。</li></ul><h2 id="规范化" tabindex="-1">规范化 <a class="header-anchor" href="#规范化" aria-label="Permalink to &quot;规范化&quot;"></a></h2><ul><li>代码请遵循<a href="https://pep8.org/" target="_blank" rel="noreferrer"><code>PEP8</code></a>和<a href="https://google.github.io/styleguide/pyguide.html" target="_blank" rel="noreferrer"><code>Google Python Style Guide</code></a></li><li>此外,提交到轻雪仓库的代码,请遵循以下规范: <ul><li>请确保代码是可运行的,没有危害的。</li><li>请确保代码的类型提示是正确的。</li><li>请确保注释风格为<a href="https://google.github.io/styleguide/pyguide.html" target="_blank" rel="noreferrer"><code>Google Docstring</code></a>或<a href="https://github.com/LiteyukiStudio/litedoc" target="_blank" rel="noreferrer"><code>Liteyuki Docstring</code></a>(推荐)以保证Litedoc能够正确解析并生成文档。</li><li>若有面向普通用户部分,请确保文档是完善的(每种语言都有对应的文档)。</li></ul></li><li>文档请遵循<a href="https://www.markdownguide.org/" target="_blank" rel="noreferrer"><code>Markdown</code></a>语法并且支持vitepress相关内容 <ul><li>编辑文档时每个语言的文档都要修订。</li><li>请确保文档内的链接是正确的,不要出现无法访问的链接。</li><li>请确保<strong>用户文档</strong>是通俗易懂的,<strong>开发文档</strong>是详细的。</li></ul></li></ul><h2 id="最后" tabindex="-1">最后 <a class="header-anchor" href="#最后" aria-label="Permalink to &quot;最后&quot;"></a></h2><ul><li>本项目是一个非盈利的开源项目,我们欢迎任何人参与开发,你的贡献将会使轻雪变得更好。</li></ul>',12),i=[r];function d(c,n,h,s,u,g){return t(),a("div",null,i)}const f=e(l,[["render",d]]);export{p as __pageData,f as default};