use external toc for docs
This commit is contained in:
parent
17783d5b9e
commit
f74a046d3b
20
docs/conf.py
20
docs/conf.py
|
@ -8,8 +8,8 @@ import sys
|
|||
from pathlib import Path
|
||||
|
||||
## Make sure aputils is in sys.path
|
||||
modpath = Path(__file__).resolve().parent.parent
|
||||
sys.path.insert(0, str(modpath))
|
||||
docpath = Path(__file__).resolve().parent
|
||||
sys.path.insert(0, str(docpath.parent))
|
||||
|
||||
## Get the major and minor Python version numbers to link to the proper documentation for Python classes
|
||||
pyversion = '.'.join(str(v) for v in sys.version_info[:2])
|
||||
|
@ -30,9 +30,17 @@ release = '0.0.1'
|
|||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.viewcode'
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx_external_toc'
|
||||
]
|
||||
|
||||
autodoc_typehints = "description"
|
||||
autodoc_class_signature = "separated"
|
||||
autodoc_member_order = "bysource"
|
||||
|
||||
external_toc_path = str(docpath.joinpath('toc.yml'))
|
||||
external_toc_exclude_missing = False
|
||||
|
||||
templates_path = ['_templates']
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
intersphinx_mapping = {
|
||||
|
@ -40,14 +48,10 @@ intersphinx_mapping = {
|
|||
'crypto': ('https://www.pycryptodome.org/', None)
|
||||
}
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||
|
||||
autodoc_typehints = "description"
|
||||
autodoc_class_signature = "separated"
|
||||
autodoc_member_order = "bysource"
|
||||
|
||||
#html_theme = 'sphinx_rtd_theme'
|
||||
html_theme = 'furo'
|
||||
html_static_path = ['_static']
|
||||
# latex_elements = {
|
||||
|
|
|
@ -2,11 +2,3 @@ Welcome to ActivityPub Utilities's documentation!
|
|||
=================================================
|
||||
|
||||
ApUtils is a collection of classes and functions to aid in the development of an ActivityPub server.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents
|
||||
:hidden:
|
||||
|
||||
Usage <pages/usage>
|
||||
API <pages/api>
|
||||
|
|
|
@ -1,9 +1,2 @@
|
|||
API
|
||||
===
|
||||
|
||||
.. toctree::
|
||||
|
||||
api/signer
|
||||
api/misc
|
||||
api/enums
|
||||
api/exceptions
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
Usage
|
||||
=====
|
||||
|
||||
.. toctree::
|
||||
|
||||
usage/signer
|
||||
|
|
16
docs/toc.yml
Normal file
16
docs/toc.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
root: index
|
||||
subtrees:
|
||||
- entries:
|
||||
- file: pages/api.rst
|
||||
title: API
|
||||
subtrees:
|
||||
- entries:
|
||||
- file: pages/api/signer.rst
|
||||
- file: pages/api/misc.rst
|
||||
- file: pages/api/enums.rst
|
||||
- file: pages/api/exceptions.rst
|
||||
- file: pages/usage.rst
|
||||
title: Usage
|
||||
subtrees:
|
||||
- entries:
|
||||
- file: pages/usage/signer.rst
|
Loading…
Reference in a new issue