diff --git a/doc/requirements.txt b/doc/requirements.txt index 7430c34511..7d2a05052f 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,7 +1,7 @@ sphinx==3.2.1 sphinx-autobuild>=0.7.1 sphinx-autodoc-typehints>=1.6.0 -sphinx-rtd-theme>=0.4.3 +sphinx_material==0.0.30 m2r2>=0.2.5 sphinxcontrib-apidoc>=0.3.0 nbsphinx>=0.4.2 diff --git a/doc/source/Seldon_White.png b/doc/source/Seldon_White.png index 259d4e523f..a2a69832c7 100644 Binary files a/doc/source/Seldon_White.png and b/doc/source/Seldon_White.png differ diff --git a/doc/source/_static/theme_overrides.css b/doc/source/_static/theme_overrides.css index 56cc77a733..8b13789179 100644 --- a/doc/source/_static/theme_overrides.css +++ b/doc/source/_static/theme_overrides.css @@ -1,64 +1 @@ -/* https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html */ -/* override table width restrictions */ -@media screen and (min-width: 767px) { - .wy-table-responsive table td { - /* !important prevents the common CSS stylesheets from overriding - this as on RTD they are loaded after this stylesheet */ - white-space: normal !important; - } - - .wy-table-responsive { - overflow: visible !important; - } - /* https://blog.deimos.fr/2014/10/02/sphinxdoc-and-readthedocs-theme-tricks-2/ */ - .wy-nav-content { - max-width: 1250px - } -} - - /* Seldon brand updates */ - .wy-side-nav-search { - background-color: #ff4072; - } - - .wy-menu-vertical p.caption { - color: #ff4072; - } - - .wy-nav-side { - color: #cccccc; - background: #000000; - } - - .rst-versions .rst-current-version { - color:#00ded0; - background:#000000; - } - -} - -@media screen and (min-width: 1100px) { - .wy-nav-content-wrap { - background: #f2f2f2; - } -} - -.wy-nav-top{ - background:#ff4072; -} - -h1 { - font-size: 250%; -} - -h2 { - font-size: 200%; -} -h3 { - font-size: 160%; -} -h4 { - font-size: 140%; - font-weight: normal; -} diff --git a/doc/source/conf.py b/doc/source/conf.py index 25a5349c57..6486e34fff 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -14,6 +14,7 @@ # import os import sys +import sphinx_material sys.path.insert(0, os.path.abspath("../..")) @@ -168,10 +169,43 @@ # -- Options for HTML output ------------------------------------------------- +# -- Options for HTML output ------------------------------------------------- + # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "sphinx_rtd_theme" +# Chosen Themes: +# * https://github.com/bashtage/sphinx-material/ +# * https://github.com/myyasuda/sphinx_materialdesign_theme +html_theme = "sphinx_material" + +if html_theme == "sphinx_material": + html_theme_options = { + "google_analytics_account": "", + "base_url": "https://docs.seldon.io/projects/seldon-core/", + "color_primary": "indigo", + "color_accent": "teal", + "repo_url": "https://github.com/SeldonIO/seldon-core/", + "repo_name": "Seldon Core", + "nav_title": "Seldon Core Documentation", + "globaltoc_depth": 1, + "globaltoc_collapse": False, + "globaltoc_includehidden": False, + "repo_type": "github", + "nav_links": [ + { + "href": "https://github.com/SeldonIO/seldon-core", + "internal": False, + "title": "Seldon Repo", + }, + ], + } + + extensions.append("sphinx_material") + html_theme_path = sphinx_material.html_theme_path() + html_context = sphinx_material.get_html_context() + +html_sidebars = {"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]} # The Seldon Logo located at the top of the navigation bar. html_logo = "Seldon_White.png" @@ -180,7 +214,6 @@ # further. For a list of options available for each theme, see the # documentation. # -html_theme_options = {"sticky_navigation": False, "includehidden": False} # 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,