Skip to content

Commit 922db26

Browse files
authoredAug 15, 2024
Prepare 2.0.0rc1 (#617)
Closes #616. We decided to not change of the option names in 2.0 because it is too disruptive. We also don't remove `disable_ecosystem_logo`, even though it no longer does anything. This PR refreshes the README to better explain how to use the docs with recent changes, such as GitHub Pages rather than qiskit.org.
1 parent d8a2183 commit 922db26

File tree

4 files changed

+17
-24
lines changed

4 files changed

+17
-24
lines changed
 

‎CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ The release process changes whether you are releasing the very first `rc1` for t
172172
1. `git checkout main`
173173
2. `git pull upstream main`
174174
3. `git checkout -b release-<version-number>`, e.g. `release-1.11.0rc1`
175-
4. Bump `src/qiskit_sphinx_theme/__init__.py` to use the new version, e.g. https://github.com/Qiskit/qiskit_sphinx_theme/pull/207
175+
4. Bump `src/qiskit_sphinx_theme/__init__.py` to use the new version, e.g. https://github.com/Qiskit/qiskit_sphinx_theme/pull/596
176176
5. PR the change and land it
177177
2. Push the Git tag:
178178
1. `git checkout main`

‎README.md

+14-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# qiskit-sphinx-theme
2-
The Sphinx theme for Qiskit Ecosystem documentation.
2+
The Sphinx theme for Qiskit ecosystem documentation.
33

44
### Warning: new theme migration
55

@@ -14,7 +14,7 @@ This repository hosts three things:
1414
- example docs (located in the `example_docs/` folder)
1515
- Qiskit Docs Guide (located in the `docs_guide/` folder)
1616

17-
The `qiskit-ecosystem` theme is used by projects in the [Qiskit Ecosystem](https://qiskit.github.io/ecosystem).
17+
The `qiskit-ecosystem` theme is used by projects in the [Qiskit ecosystem](https://www.ibm.com/quantum/ecosystem).
1818

1919
The example docs are a minimal Sphinx project that is used for testing the Qiskit Sphinx Theme. Every
2020
pull request will trigger [a GitHub workflow](https://github.com/Qiskit/qiskit_sphinx_theme/blob/main/.github/workflows/main.yml) that builds the example docs to make sure the changes do
@@ -50,13 +50,15 @@ html_title = f"{project} {release}"
5050

5151
## Enable translations
5252

53-
First, coordinate with the Translations team at https://github.com/qiskit-community/qiskit-translations to express your interest and to coordinate setting up the infrastructure.
53+
Refer to [Sphinx's internationalization guide](https://www.sphinx-doc.org/en/master/usage/advanced/intl.html) for how to build your documentation with different languages.
5454

55-
Once the Translations team is ready, then update your `conf.py`:
55+
Once you have the translated documentation, you will need to start additionally deploying your docs to `<project-prefix>/locale/<locale-code>/`, e.g. `https://qiskit-community.github.io/qiskit-finance/locale/de_DE/index.html`.
56+
57+
Finally, update your `conf.py`:
5658

5759
* Ensure that `qiskit_sphinx_theme` is in the `extensions` setting.
5860
* Set the option `translations_list` to a list of pairs of the locale code and the language name, e.g. `[..., ("de_DE", "German")]`.
59-
* Set the option `docs_url_prefix` to your project's URL prefix, like `ecosystem/finance`.
61+
* Set the option `docs_url_prefix` to your project's URL prefix, like `qiskit-finance`.
6062

6163
For example:
6264

@@ -73,14 +75,14 @@ translations_list = [
7375
('de_DE', 'German'),
7476
]
7577

76-
docs_url_prefix = "ecosystem/finance"
78+
docs_url_prefix = "qiskit-finance"
7779
```
7880

7981
## Enable Previous Releases
8082

8183
This feature allows you to link to previous versions of the docs in the left sidebar.
8284

83-
First, start additionally deploying your docs to `<project-prefix>/stable/<version>/`, e.g. `/ecosystem/finance/stable/0.5/index.html`. See https://github.com/Qiskit/qiskit-experiments/blob/227867937a08075092cd11756214bee3fb1d4d3d/tools/deploy_documentation.sh#L38-L39 for an example.
85+
First, start additionally deploying your docs to `<project-prefix>/stable/<version>/`, e.g. `https://qiskit-community.github.io/qiskit-experiments/stable/0.5/index.html`. See https://github.com/qiskit-community/qiskit-experiments/blob/7a0924c24549ab4f38819a86c0ac49214d819ba2/.github/workflows/docs_stable.yml#L25-L38 for an example.
8486

8587
Then, update your `conf.py`:
8688

@@ -89,7 +91,7 @@ Then, update your `conf.py`:
8991
* Each of these versions must be deployed with the above `stable/<version>` URL scheme.
9092
* You can manually set this, or some projects write a Sphinx extension to dynamically compute the value.
9193
* You should only put prior versions in this list, not the current release.
92-
* Set the option `docs_url_prefix` to your project's URL prefix, like `ecosystem/finance`.
94+
* Set the option `docs_url_prefix` to your project's URL prefix, like `qiskit-experiments`.
9395

9496
For example:
9597

@@ -103,7 +105,7 @@ html_context = {
103105
"version_list": ["0.4", "0.5"],
104106
}
105107

106-
docs_url_prefix = "ecosystem/finance"
108+
docs_url_prefix = "qiskit-experiments"
107109
```
108110

109111
## Use custom RST directives
@@ -116,11 +118,9 @@ The `qiskit_sphinx_theme` extension defines the below custom directives for you
116118
![](tests/js/qiskit.test.js-snapshots/custom-directives-1-linux.png)
117119
![](tests/js/qiskit.test.js-snapshots/custom-directives-2-linux.png)
118120

119-
## Customize or disable the Ecosystem theme logo
120-
121-
The `qiskit-ecosystem` theme includes the Qiskit Ecosystem logo by default.
121+
## Add a custom logo
122122

123-
You can use a custom logo by adding a logo file (SVG or PNG) as a sibling to your `conf.py`, e.g. `docs/logo.svg`. Then, set `html_logo` in `conf.py` to the name of the file, e.g. `html_logo = "logo.png"`.
123+
You can add a custom logo by adding a logo file (SVG or PNG) as a sibling to your `conf.py`, e.g. `docs/logo.svg`. Then, set `html_logo` in `conf.py` to the name of the file, e.g. `html_logo = "logo.png"`.
124124

125125
When using a custom logo, you may want to disable the project's name in the sidebar by setting `sidebar_hide_name` in `html_theme_options`:
126126

@@ -130,17 +130,9 @@ html_theme_options = {
130130
}
131131
```
132132

133-
You can disable logos by setting `disable_ecosystem_logo` in `html_theme_options`:
134-
135-
```python
136-
html_theme_options = {
137-
"disable_ecosystem_logo": True,
138-
}
139-
```
140-
141133
## Tip: suggested site structure
142134

143-
To keep UX/UI similar across different Qiskit packages, we encourage the following structure for you sidebar, which can be set in the toctree of your `index.rst`:
135+
To keep UX/UI similar across different Qiskit ecosystem packages, consider using the following structure for your sidebar, which can be set in the toctree of your `index.rst`:
144136

145137
```rst
146138
.. toctree::

‎src/qiskit_sphinx_theme/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import sphinx.application
2323
import sphinx.config
2424

25-
__version__ = "1.16.0rc1"
25+
__version__ = "2.0.0rc1"
2626
__version_full__ = __version__
2727

2828

‎src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/theme.conf

+1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ sidebars =
2424
custom_templates/sidebar_languages.html
2525

2626
[options]
27+
# This option is no longer used in v2+, but it's kept for backwards compatibility.
2728
disable_ecosystem_logo =

0 commit comments

Comments
 (0)