From c57cad24c363cbdee35ee944181b65ccaec380b2 Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:49:45 -0600 Subject: [PATCH] Switch to Qiskit Ecosystem theme (#926) * Upgrade to new Qiskit sphinx theme * Use ecosystem theme --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit e9b9c128468ce09ec970c261a92b4072bca262aa) --- docs/source/_static/overrides.css | 3 - docs/source/_templates/layout.html | 187 ------------------- docs/source/_templates/theme_variables.jinja | 8 - docs/source/conf.py | 13 +- docs/source/requirements.txt | 2 +- 5 files changed, 6 insertions(+), 207 deletions(-) delete mode 100644 docs/source/_static/overrides.css delete mode 100644 docs/source/_templates/layout.html delete mode 100644 docs/source/_templates/theme_variables.jinja diff --git a/docs/source/_static/overrides.css b/docs/source/_static/overrides.css deleted file mode 100644 index c6a64ff83..000000000 --- a/docs/source/_static/overrides.css +++ /dev/null @@ -1,3 +0,0 @@ -:root { - --header-height: 0rem; -} diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html deleted file mode 100644 index 4b7c22a80..000000000 --- a/docs/source/_templates/layout.html +++ /dev/null @@ -1,187 +0,0 @@ -{# Sphinx template variable setup #} -{%- if not embedded and docstitle %} - {%- set titlesuffix = " — "|safe + docstitle|e %} -{%- else %} - {%- set titlesuffix = "" %} -{%- endif %} -{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) -%} - - - - - - - {{ metatags }} - {%- block htmltitle %} - {{ title|striptags|e }}{{ titlesuffix }} - {%- endblock %} - {%- if favicon_url %} - - {%- endif %} - - {#- CSS #} - {%- for css in css_files %} - {%- if css|attr("rel") %} - - {%- else %} - - {%- endif %} - {%- endfor %} - {%- for cssfile in extra_css_files %} - - {%- endfor -%} - - - {%- if analytics_enabled %} - - - - {%- endif -%} - - - - {% block extrabody %} {% endblock %} - - - - - {% include "languages.html" %} - - - - - - {% include "sidebar.html" %} - -
- - -
-
- {% include "breadcrumbs.html" %} -
-
- - -
- -
- {%- block content %} -
-
- {%- block document %} -
- {% block body %}{% endblock %} -
-
- {%- endblock %} - {% include "footer.html" %} -
- {%- endblock %} -
- - -
-
-
- {{ toc }} -
-
-
-
-
- -{%- block footer %} {% endblock %} - - - - {%- for scriptfile in script_files %} - {{ js_tag(scriptfile) }} - {%- endfor %} - - - - - - - - - - - diff --git a/docs/source/_templates/theme_variables.jinja b/docs/source/_templates/theme_variables.jinja deleted file mode 100644 index 625a44f17..000000000 --- a/docs/source/_templates/theme_variables.jinja +++ /dev/null @@ -1,8 +0,0 @@ -{%- set external_urls = { - 'github': 'https://github.com/Qiskit/retworkx', - 'docs': 'https://retworkx.readthedocs.io/en/stable/', - 'slack': 'https://qiskit.slack.com', - 'home': 'https://qiskit.org/', - 'resources': 'https://qiskit.org/learn', -} --%} diff --git a/docs/source/conf.py b/docs/source/conf.py index ddc58fb81..80e502fc2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -42,7 +42,6 @@ 'sphinx_reredirects', 'qiskit_sphinx_theme', ] -html_static_path = ["_static"] templates_path = ['_templates'] extra_css_files = ["overrides.css"] @@ -94,15 +93,13 @@ """ # HTML Output Options -html_theme = 'qiskit_sphinx_theme' -html_theme_options = { - 'logo_only': False, - 'display_version': True, - 'prev_next_buttons_location': 'bottom', - 'style_external_links': True, -} +html_theme = 'qiskit-ecosystem' +html_title = f"{project} {release}" htmlhelp_basename = 'rustworkx' +html_theme_options = { + "disable_ecosystem_logo": True, +} # Latex options latex_elements = {} diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt index 32b3c6359..bef0d9f7c 100644 --- a/docs/source/requirements.txt +++ b/docs/source/requirements.txt @@ -4,7 +4,7 @@ jupyter-sphinx pydot pillow>=4.2.1 reno>=3.4.0 -qiskit-sphinx-theme~=1.12.0 +qiskit-sphinx-theme~=1.14.0rc1 matplotlib>=3.4 sphinx-reredirects sphinxemoji