Skip to content

Commit fce4459

Browse files
Update instructions for preview now that there's a home page (Qiskit#1054)
The recently released Preview docker image now has a home page, so `localhost:3000` no longer 404s. It acts like a table of contents. ![image](https://github.com/Qiskit/documentation/assets/14852634/4153cbc1-aaa0-4e1e-9d39-5b0cd9a1c7ef) (Users need to run `docker pull qiskit/documentation` to pull in this change.)
1 parent bfccad6 commit fce4459

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,24 +73,9 @@ npm install
7373

7474
## Preview the docs locally
7575

76-
Run `./start` in your terminal, then open http://localhost:3000/start in your browser.
76+
Run `./start` in your terminal, then open http://localhost:3000 in your browser.
7777

78-
The local preview does not include the initial index page and the top nav bar from docs.quantum.ibm.com. Therefore, you must directly navigate in the URL to the folder that you want:
79-
80-
- http://localhost:3000/build
81-
- http://localhost:3000/start
82-
- http://localhost:3000/run
83-
- http://localhost:3000/transpile
84-
- http://localhost:3000/verify
85-
- http://localhost:3000/api/qiskit
86-
- http://localhost:3000/api/qiskit-ibm-runtime
87-
- http://localhost:3000/api/qiskit-ibm-provider
88-
- http://localhost:3000/api/migration-guides
89-
90-
For historical API versions, use URLs like http://localhost:3000/api/qiskit/0.44, i.e. put the desired version after the
91-
API name.
92-
93-
For translations, put the language code in front of the URL, like http://localhost:3000/es/start or http://localhost:3000/fr/start. You can find the language codes by looking in the `translations/` folder.
78+
The preview application does not include the top nav bar. Instead, navigate to the folder you want with the links in the home page. You can return to the home page at any time by clicking "IBM Quantum Documentation Preview" in the top-left of the header.
9479

9580
Warning: `./start` does not check if there is a new version of the docs application available. Run `docker pull qiskit/documentation` to update to the latest version of the app.
9681

start

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ def translation_volume_mounts() -> Iterator[str]:
2626
Docker complains that the volume is already mounted when we mount the `/docs` folder. So, instead
2727
we need to be more specific to mount each language's folder.
2828
"""
29-
for folder in PWD.glob("translations/*"):
30-
yield from ["-v", f"{folder}:/home/node/app/docs/{folder.name}"]
29+
for path in PWD.glob("translations/*"):
30+
if not path.is_dir():
31+
continue
32+
yield from ["-v", f"{path}:/home/node/app/docs/{path.name}"]
3133

3234

3335
def main() -> None:

0 commit comments

Comments
 (0)