diff --git a/README.md b/README.md index cdb4b354da..24dc4bfa43 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ You can preview the docs locally by following these two steps: 1. Ensure Docker is running. For example, open Rancher Desktop. 2. Run `./start` in your terminal, and open http://localhost:3000 in your browser. + - On Windows, run `python start` instead. Alternatively, use Windows Subsystem for Linux and run `./start`. 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. diff --git a/start b/start index 93a737a993..c7ea894137 100755 --- a/start +++ b/start @@ -18,7 +18,10 @@ from pathlib import Path # Get the latest digest by running `docker pull icr.io/qc-open-source-docs-public/preview:latest`. IMAGE_DIGEST = "sha256:00708d7f6926826fbea7e1469380ffc7cdccf540760d0be1828d88c31cd7def8" -PWD = Path(__file__).parent +# Docker on Windows uses `/` rather than `\`, so we need to call `.as_posix()`: +# https://medium.com/@kale.miller96/how-to-mount-your-current-working-directory-to-your-docker-container-in-windows-74e47fa104d7 +PWD = Path(__file__).parent.as_posix() + IMAGE = f"icr.io/qc-open-source-docs-public/preview@{IMAGE_DIGEST}"