doctree¶
Create doc tree if you follows Sanhe Sphinx standard.
-
class
docfly.doctree.ArticleFolder(dir_path=None)[source]¶ Represent an
index.rstfile with Title sitting in a directory.Parameters: - dir_path – A folder contains single rst file. The rst file path
will be
{dir_path}/{_filename}. - title – The title line above ‘==========’
中文文档
一篇 Article 代表着一个位于文件夹内的
index.rst文件. 其中必然有至少一个标题元素.-
rst_path¶ The actual rst file absolute path.
-
rel_path¶ File relative path from the folder.
-
title¶ Title for the first header.
-
get_title()[source]¶ Get title line from .rst file.
中文文档
从一个
_filename所指定的 .rst 文件中, 找到顶级标题. 也就是第一个====或----或~~~~上面一行.
-
sub_article_folders¶ Returns all valid ArticleFolder sitting inside of
ArticleFolder.dir_path.
- dir_path – A folder contains single rst file. The rst file path
will be
-
class
docfly.doctree.DocTree[source]¶ This class is designed for taking a rst file, and find all
.. articles::directives, then automatically generate.. toctree::directive.The file structure has to follow Sanhe Sphinx standard.
Deprecated since version 0.: message