Add social buttons to sidebar
i.e.
* GitHub
* Travis CI
* CodeCov
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys
import importlib
+import pkg_resources
+import sys
assert sys.version_info > (3,), 'Python 3 required to build docs'
@@ -64,6 +65,8 @@ source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
+project = pkg_resources.get_distribution('cherrypy').project_name
+
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None # noqa
@@ -128,6 +131,15 @@ html_theme = getattr(custom_sphinx_theme, '__name__', 'default')
# }
html_theme_options = {
'logo': 'images/cherrypy_logo_big.png',
+ 'github_user': project.lower(),
+ 'github_repo': project.lower(),
+ 'github_button': True,
+ 'github_banner': True,
+ 'github_type': 'watch',
+ 'github_count': True,
+ 'travis_button': True,
+ 'codecov_button': True,
+ # 'analytics_id': ...,
}
# Add any paths that contain custom themes here, relative to this directory.
