添加文档构建章节
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
|
||||
|
||||
.. image:: ../_static/Pear\ Admin\ Flask\ 启动流程图.png
|
||||
:target: ../_static/Pear\ Admin\ Flask\ 启动流程图.png
|
||||
:target: ../_images/Pear\ Admin\ Flask\ 启动流程图.png
|
||||
:align: center
|
||||
|
||||
|
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
插件功能旨在最大限度不修改原框架的前提下添加新功能,并可以像程序原有框架一样进行流程注册,而且不需要修改任何程序框架原有代码(仅在配置文件中设置即可)。
|
||||
|
||||
所有插件放置在 `plugins` 文件夹中,项目提供了三个示例插件,分别是 `helloworld` 、 `realip` 、 `replacePage` 和 `giftManager`,
|
||||
所有插件放置在 `plugins` 文件夹中,项目提供了四个示例插件,分别是 `helloworld` 、 `realip` 、 `replacePage` 和 `giftManager`,
|
||||
分别用于示例页面的注册、修改 Flask 上下文、页面替换和新功能接入。
|
||||
|
||||
像项目自带的用户管理、部门管理等基本功能属于程序自身的“功能插件”,对于大多数衍生项目来说,多的是修改字符串和删除部分不需要的功能,
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
PLUGIN_ENABLE_FOLDERS = []
|
||||
|
||||
而在目录 `plugins` 中,你会发现存在 文件夹名称 为 `helloworld` 、 `realip` 、 `replacePage` 和 `giftManager` 三个插件。
|
||||
而在目录 `plugins` 中,你会发现存在 文件夹名称 为 `helloworld` 、 `realip` 、 `replacePage` 和 `giftManager` 四个插件。
|
||||
比如我们想要启用 `helloworld` 插件,仅需要做如下修改:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
构建文档
|
||||
==================
|
||||
|
||||
本章节讲述如何构建文档,构建文档使用到 Python 中的 sphinx 工具,需要使用 Python 进行安装。
|
||||
|
||||
安装必要依赖
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
文档位置位于 `docs` 文件夹,所以先切换到 `docs` 文件。
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd docs
|
||||
pip install -r requirements.txt
|
||||
|
||||
构建文档
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
使用 `sphinx-build .\source .\_build` 进行构建文档。
|
||||
|
||||
编辑文档
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
如果修改文档,请在 `source` 中修改并重新构建。
|
||||
@@ -9,3 +9,4 @@
|
||||
update
|
||||
quickstart
|
||||
migration
|
||||
docs
|
||||
|
||||
Reference in New Issue
Block a user