From 8d37c39821b3c9fe8263125f1180cd6dba0ded2fc7824820ad7766809700e589 Mon Sep 17 00:00:00 2001 From: f4lco Date: Wed, 30 Oct 2019 19:38:57 +0100 Subject: [PATCH] Switch documentation theme to Alabaster --- docs/_static/css/custom.css | 4 ---- docs/conf.py | 33 +++++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 12 deletions(-) delete mode 100644 docs/_static/css/custom.css diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css deleted file mode 100644 index b76c467..0000000 --- a/docs/_static/css/custom.css +++ /dev/null @@ -1,4 +0,0 @@ -/* Make the headlines for class and function documentation span the entire width */ -.rst-content dl.class dt, .rst-content dl.function dt { - width: 100%; -} \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 2574226..f37f0b3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,6 +12,7 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # +import alabaster import os import sys sys.path.insert(0, os.path.abspath('..')) @@ -20,7 +21,7 @@ sys.path.insert(0, os.path.abspath('..')) # -- Project information ----------------------------------------------------- project = u'OpenMensa Potsdam' -copyright = u'2018, f4lco' +copyright = u'2019, f4lco' author = u'f4lco' # The short X.Y version @@ -31,9 +32,6 @@ release = u'0.1' # -- General configuration --------------------------------------------------- -def setup(app): - app.add_stylesheet('css/custom.css') - # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' @@ -44,6 +42,7 @@ def setup(app): extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.githubpages', + 'alabaster', ] # Add any paths that contain templates here, relative to this directory. @@ -76,21 +75,31 @@ pygments_style = None # -- Options for HTML output ------------------------------------------------- +html_theme_path = [alabaster.get_path()] + # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +html_theme = 'alabaster' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = {} +html_theme_options = { + 'github_banner': True, + 'github_button': False, + 'github_user': 'f4lco', + 'github_repo': 'om-parser-stw-potsdam-v2', + 'travis_button': True, +} + + # 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'] +# html_static_path = [] # Custom sidebar templates, must be a dictionary that maps document names # to template names. @@ -100,7 +109,15 @@ html_static_path = ['_static'] # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', # 'searchbox.html']``. # -# html_sidebars = {} +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', + 'searchbox.html', + 'donate.html', + ] +} # -- Options for HTMLHelp output ---------------------------------------------