diff --git a/docs/source/_templates/localtoc.html b/docs/source/_templates/localtoc.html new file mode 100644 index 0000000000..c086a18df8 --- /dev/null +++ b/docs/source/_templates/localtoc.html @@ -0,0 +1,13 @@ +{# + basic/localtoc.html + ~~~~~~~~~~~~~~~~~~~ + + Sphinx sidebar template: local table of contents. + + :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{%- if display_toc %} +

{{ _('Table of Contents') }}

+ {{ toc }} +{%- endif %} diff --git a/docs/source/_templates/sourcelink.html b/docs/source/_templates/sourcelink.html new file mode 100644 index 0000000000..ddc699894e --- /dev/null +++ b/docs/source/_templates/sourcelink.html @@ -0,0 +1,13 @@ +{# +Page source link + +#} +{%- if show_source and has_source and sourcename %} +
+ + +
+{%- endif %} diff --git a/docs/source/conf.py b/docs/source/conf.py index f93740a344..690da5eaa7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -65,6 +65,22 @@ autosectionlabel_prefix_document = True # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Custom extras for sidebar +html_sidebars = { + '**': [ + "searchbox.html", + "localtoc.html", + # "globaltoc.html", + "relations.html", + "sourcelink.html", + "versioning.html", + ] +} # napoleon Google-style docstring parser @@ -100,6 +116,7 @@ autodoc_default_options = { "special-members": "__init__", } + def autodoc_skip_member(app, what, name, obj, skip, options): if _no_autodoc: return True @@ -115,17 +132,6 @@ def autodoc_skip_member(app, what, name, obj, skip, options): # html_theme = 'alabaster' -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Custom extras for sidebar -# html_sidebars = { -# '**': [ -# "versioning.html" -# ] -# } # sphinx-multiversion config @@ -147,10 +153,10 @@ def url_resolver(url): return _github_doc_root + url - # dynamic setup -auto_toc_sections = ["Contents", "Toc"] +auto_toc_sections = ["Contents", "Toc", "Index"] + def setup(app): app.connect("autodoc-skip-member", autodoc_skip_member) diff --git a/docs/source/index.md b/docs/source/index.md index 550f38085f..3fbaa9f1f6 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -1,5 +1,3 @@ -# Home - # Evennia Documentation This is the manual of [Evennia](http://www.evennia.com), the open source Python `MU*` creation system. @@ -11,14 +9,15 @@ suggestion box][form]! There is [a lengthier introduction](Evennia-Introduction) to read. You might also want to read about [how to get and give help](how-to-get-and-give-help). -# Contents +# Index -- The [Getting Started](Getting-Started) page helps installing and starting Evennia for the first time. -- The [Admin Docs](Administrative-Docs) covers running and maintaining an Evennia server. -- The [Builder Docs](Builder-Docs) helps for starting to build a game world using Evennia. -- The [Developer Central](Developer-Central) describes how Evennia works and is used by coders. -- The [Tutorials & Examples](Tutorials) contains help pages on a step-by-step or tutorial format. -- The [API](api/evennia-api) documentation is created from the latest source code. +* [Getting Started](Getting-Started) page helps installing and starting Evennia for the first time. +* [Admin Docs](Administrative-Docs) covers running and maintaining an Evennia server. +* [Builder Docs](Builder-Docs) helps for starting to build a game world using Evennia. +* [Developer Central](Developer-Central) describes how Evennia works and is used by coders. +* [Tutorials & Examples](Tutorials) contains help pages on a step-by-step or tutorial format. +* [API](api/evennia-api) documentation is created from the latest source code. +* [Document index](toc) [search]: https://www.google.com/cse/publicurl?cx=010440404980795145992:6ztkvqc46je [group]: https://groups.google.com/forum/#%21forum/evennia