|
13 | 13 | project = 'MCDR-Plugins' |
14 | 14 | copyright = f'{datetime.datetime.now().year}, xieyuen' |
15 | 15 | author = 'xieyuen' |
16 | | -release = '0.1.0' |
| 16 | +release = '1.0.0' |
17 | 17 |
|
18 | | -src = Path(__file__).parent.parent.parent / "src" |
19 | | -dependencies = Path(__file__).parent.parent.parent / "dependencies" |
| 18 | +repo_root = Path(__file__).parent.parent.parent |
| 19 | +src = repo_root / "src" |
| 20 | +dependencies = repo_root / "dependencies" |
20 | 21 |
|
21 | 22 | for directory in src.iterdir(): |
22 | 23 | sys.path.append(str(directory)) |
|
52 | 53 | 'sphinxcontrib.asciinema' |
53 | 54 | ] |
54 | 55 |
|
55 | | -templates_path = ['_templates'] |
| 56 | +templates_path = ['../templates'] |
56 | 57 | exclude_patterns = [] |
57 | 58 |
|
58 | 59 | language = 'zh_CN' |
|
61 | 62 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
62 | 63 |
|
63 | 64 | html_theme = 'sphinx_rtd_theme' |
64 | | -html_static_path = ['_static'] |
| 65 | +html_static_path = ['../static'] |
65 | 66 | html_css_files = ['custom.css'] |
66 | 67 |
|
67 | 68 | # -- extension configuations ------------------------------------------------- |
68 | 69 |
|
69 | 70 | # 常用的外部文档链接映射 |
70 | 71 | intersphinx_mapping = { |
71 | 72 | 'mcdreforged': ('https://docs.mcdreforged.com/zh-cn/latest/', None), |
| 73 | + 'python': ('https://docs.python.org/3', None), |
72 | 74 | } |
73 | | -autodoc_default_options = { |
74 | | - 'members': True, # 显示所有成员 |
75 | | - 'member-order': 'bysource', # 按源代码顺序 |
76 | | - 'special-members': '__init__', # 显示特殊方法 |
77 | | - 'undoc-members': True, # 显示没有文档的成员 |
78 | | - 'show-inheritance': True, # 显示继承关系 |
79 | | -} |
80 | | -# napoleon_use_ivar = True # 使用 :ivar: 而不是生成独立的属性文档 |
| 75 | + |
| 76 | +# -- Options for sphinx.ext.autodoc ------------------------------------------------- |
| 77 | +# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html |
| 78 | +autodoc_member_order = 'bysource' |
| 79 | +autodoc_inherit_docstrings = False # so overridden methods won't pop up |
| 80 | + |
| 81 | + |
| 82 | +# -- Options for sphinx.ext.autosectionlabel ------------------------------------------------- |
| 83 | +# https://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html |
| 84 | +autosectionlabel_prefix_document = True |
| 85 | + |
81 | 86 |
|
82 | 87 | # 删除线样式 |
83 | 88 | rst_prolog = """ |
|
0 commit comments