mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Add doc-contribution page, toctree-creation mechanism
This commit is contained in:
parent
c380782d61
commit
31306f5b22
6 changed files with 833 additions and 225 deletions
|
|
@ -126,7 +126,7 @@ def url_resolver(url):
|
|||
elif url.startswith(githubstart):
|
||||
urlpath = url[len(githubstart):]
|
||||
if not (urlpath.startswith("develop/") or urlpath.startswith("master")):
|
||||
urlpath = "master/" + urlpath
|
||||
urlpath = "master/" + urlpath
|
||||
return _github_code_root + urlpath
|
||||
elif url.startswith(apistart):
|
||||
return "api/" + url[len(apistart) :] + ".html"
|
||||
|
|
@ -182,6 +182,7 @@ if not _no_autodoc:
|
|||
|
||||
evennia._init()
|
||||
|
||||
|
||||
if _no_autodoc:
|
||||
exclude_patterns = ["api/*"]
|
||||
else:
|
||||
|
|
@ -223,11 +224,16 @@ napoleon_use_rtype = True
|
|||
# -- Main config setup ------------------------------------------
|
||||
# last setup steps for some plugins
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.connect("autodoc-skip-member", autodoc_skip_member)
|
||||
app.add_transform(AutoStructify)
|
||||
|
||||
# build toctree file
|
||||
sys.path.insert(1, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'docs'))
|
||||
from docs.pylib import create_toctree
|
||||
create_toctree.create_toctree()
|
||||
print("Updated source/toc.md file")
|
||||
|
||||
# custom lunr-based search
|
||||
# from docs import search
|
||||
# custom search
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue