mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Make the quick target more readable
This commit is contained in:
parent
cb975f1b16
commit
4e730120ee
4 changed files with 37 additions and 33 deletions
|
|
@ -55,13 +55,10 @@ release = '0.9'
|
|||
extensions = [
|
||||
"recommonmark",
|
||||
"sphinx_multiversion",
|
||||
"sphinx.ext.napoleon",
|
||||
"sphinx.ext.autosectionlabel"
|
||||
]
|
||||
|
||||
if not os.environ.get("NOAUTODOC"):
|
||||
extensions.append("sphinx.ext.napoleon")
|
||||
|
||||
|
||||
# make sure sectionlabel references can be used as path/to/file:heading
|
||||
autosectionlabel_prefix_document = True
|
||||
|
||||
|
|
@ -74,6 +71,8 @@ templates_path = ['_templates']
|
|||
exclude_patterns = []
|
||||
|
||||
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
|
|
@ -102,12 +101,34 @@ smv_outputdir_format = "versions" + sep + "{config.release}"
|
|||
# dynamic setup
|
||||
|
||||
|
||||
github_doc_root = "https://github.com/evennia/tree/master/docs"
|
||||
github_code_root = "https://github.com/evennia/tree/master/"
|
||||
github_doc_root = "https://github.com/evennia/tree/master/docs/sources/"
|
||||
|
||||
def url_resolver(url):
|
||||
print(f"in url_resolver: {url}")
|
||||
if url.startswith("github:"):
|
||||
return github_code_root + url[7:]
|
||||
else:
|
||||
return github_doc_root + url
|
||||
|
||||
|
||||
_NO_AUTODOC = os.environ.get("NOAUTODOC")
|
||||
|
||||
def autodoc_skip_member(app, what, name, obj, skip, options):
|
||||
if _NO_AUTODOC:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
if _NO_AUTODOC:
|
||||
exclude_patterns = ["api/*"]
|
||||
|
||||
|
||||
def setup(app):
|
||||
# recommonmark setup
|
||||
app.connect("autodoc-skip-member", autodoc_skip_member)
|
||||
|
||||
app.add_config_value('recommonmark_config', {
|
||||
'url_resolver': lambda url: github_doc_root + url,
|
||||
'url_resolver': url_resolver,
|
||||
'auto_toc_tree_section': 'Contents',
|
||||
}, True)
|
||||
app.add_transform(AutoStructify)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue