Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Upgrade to Qiskit Ecosystem theme (#672)
Browse files Browse the repository at this point in the history
* [WIP] Upgrade to new Qiskit Sphinx Theme

* Use ecosystem theme

* Set up IBM logo

* Remove redudant title from tutorials index

* Use better logo
  • Loading branch information
Eric-Arellano authored and kt474 committed Jul 19, 2023
1 parent 37592c4 commit f37fdb2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 33 deletions.
43 changes: 15 additions & 28 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-

# This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
# (C) Copyright IBM 2021, 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down Expand Up @@ -50,13 +48,6 @@

# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.napoleon',
'sphinx.ext.autodoc',
Expand All @@ -76,6 +67,8 @@
nbsphinx_execute = "never"
nbsphinx_widgets_path = ''

nbsphinx_thumbnails = {"**": "_static/images/logo.png"}

nbsphinx_prolog = """
{% set docname = env.doc2path(env.docname, base=None) %}
.. only:: html
Expand All @@ -93,20 +86,18 @@
nbsphinx_prolog += link_str + "{{ docname }}"

# -----------------------------------------------------------------------------
# Autosummary
# Autosummary & autodoc
# -----------------------------------------------------------------------------

autosummary_generate = True

# -----------------------------------------------------------------------------
# Autodoc
# -----------------------------------------------------------------------------

autodoc_default_options = {
'inherited-members': None,
'exclude-members': 'with_traceback'
}

autoclass_content = 'both'


# If true, figures, tables and code-blocks are automatically numbered if they
# have a caption.
Expand Down Expand Up @@ -144,24 +135,20 @@
# package. Works only for the HTML builder currently.
modindex_common_prefix = ['qiskit.']

# -- Configuration for extlinks extension ------------------------------------
# Refer to https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html


# -- Options for HTML output -------------------------------------------------

html_theme = 'qiskit_sphinx_theme'
html_theme = "qiskit-ecosystem"
html_title = f"{project} {release}"

html_logo = 'images/logo.png'
html_last_updated_fmt = '%Y/%m/%d'
html_logo = "images/ibm-quantum-logo.png"

html_theme_options = {
'logo_only': True,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': True,
# Because this is an IBM-focused project, we use a blue color scheme.
"light_css_variables": {
"color-brand-primary": "var(--qiskit-color-blue)",
},
}

html_sourcelink_suffix = ''
html_last_updated_fmt = '%Y/%m/%d'

autoclass_content = 'both'
html_sourcelink_suffix = ''
Binary file added docs/images/ibm-quantum-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/logo.png
Binary file not shown.
3 changes: 0 additions & 3 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
Tutorials
=========

How-to guides
=================================

.. nbgallery::

tutorials/1_the_ibm_quantum_account
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ qiskit-ibmq-provider>=0.19.2
# Documentation
jupyter-sphinx
nbsphinx>=0.9.2
Sphinx>=5.3.0
Sphinx>=6.0.0
sphinx-autodoc-typehints<=1.19.2
reno>=2.11.0
qiskit-sphinx-theme~=1.13.1
qiskit-sphinx-theme~=1.14.0rc1

0 comments on commit f37fdb2

Please sign in to comment.