From cbf17f77090bc7f5ad20b0aa4774b027405e9b64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 15 Feb 2022 17:45:52 +0100 Subject: [PATCH] =?UTF-8?q?Dal=C5=A1=C3=AD=20konfigurace=20sphinx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/conf.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 80f0846c..584272c8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,6 +33,8 @@ author = 'Orgové' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', + 'sphinx.ext.intersphinx', + 'sphinx.ext.autosectionlabel' ] # Add any paths that contain templates here, relative to this directory. @@ -67,5 +69,17 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +# Provázání s jinými dokumentacemi +intersphinx_mapping = {'python': ('https://docs.python.org/3', None), + 'django': ('http://docs.djangoproject.com/en/3.2/', + 'http://docs.djangoproject.com/en/3.2/_objects/'),} + +# Generování tříd/funkcí/atributů v pořádí jak jsou naprogramované +autodoc_member_order = "bysource" + +# Nezobrazování zděděné (ze super tříd) dokumentace TODO nefunguje? +autodoc_inherit_docstrings = False + +# Spouštění sphinx-apidoc from sphinx.ext.apidoc import main main(['--module-first', '-o', "modules", "..", "../*/migrations", "--templatedir", "_templates", '-f']) \ No newline at end of file