You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardexpand all lines: README.md
+14-22
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# qiskit-sphinx-theme
2
-
The Sphinx theme for Qiskit Ecosystem documentation.
2
+
The Sphinx theme for Qiskit ecosystem documentation.
3
3
4
4
### Warning: new theme migration
5
5
@@ -14,7 +14,7 @@ This repository hosts three things:
14
14
- example docs (located in the `example_docs/` folder)
15
15
- Qiskit Docs Guide (located in the `docs_guide/` folder)
16
16
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).
18
18
19
19
The example docs are a minimal Sphinx project that is used for testing the Qiskit Sphinx Theme. Every
20
20
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
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.
54
54
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`:
56
58
57
59
* Ensure that `qiskit_sphinx_theme` is in the `extensions` setting.
58
60
* 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`.
60
62
61
63
For example:
62
64
@@ -73,14 +75,14 @@ translations_list = [
73
75
('de_DE', 'German'),
74
76
]
75
77
76
-
docs_url_prefix ="ecosystem/finance"
78
+
docs_url_prefix ="qiskit-finance"
77
79
```
78
80
79
81
## Enable Previous Releases
80
82
81
83
This feature allows you to link to previous versions of the docs in the left sidebar.
82
84
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.
84
86
85
87
Then, update your `conf.py`:
86
88
@@ -89,7 +91,7 @@ Then, update your `conf.py`:
89
91
* Each of these versions must be deployed with the above `stable/<version>` URL scheme.
90
92
* You can manually set this, or some projects write a Sphinx extension to dynamically compute the value.
91
93
* 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`.
93
95
94
96
For example:
95
97
@@ -103,7 +105,7 @@ html_context = {
103
105
"version_list": ["0.4", "0.5"],
104
106
}
105
107
106
-
docs_url_prefix ="ecosystem/finance"
108
+
docs_url_prefix ="qiskit-experiments"
107
109
```
108
110
109
111
## Use custom RST directives
@@ -116,11 +118,9 @@ The `qiskit_sphinx_theme` extension defines the below custom directives for you
The `qiskit-ecosystem` theme includes the Qiskit Ecosystem logo by default.
121
+
## Add a custom logo
122
122
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"`.
124
124
125
125
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`:
126
126
@@ -130,17 +130,9 @@ html_theme_options = {
130
130
}
131
131
```
132
132
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
-
141
133
## Tip: suggested site structure
142
134
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`:
0 commit comments