From e59329437efd15cbfc5c0b5dc17d6e4f5f5ec868 Mon Sep 17 00:00:00 2001 From: Arnau Casau <47946624+arnaucasau@users.noreply.github.com> Date: Fri, 10 May 2024 16:07:20 +0200 Subject: [PATCH] Update readme to include preview instructions (#1334) The PR adds instructions to the readme to preview changes made for API docs authors locally. --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dc9917fcd45..2775f65fea7 100644 --- a/README.md +++ b/README.md @@ -73,12 +73,22 @@ npm install ## Preview the docs locally -Run `./start` in your terminal, then open http://localhost:3000 in your browser. +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. 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. 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. +### API docs authors: How to preview your changes + +API docs authors can preview their changes to one of the APIs by using the `-a` parameter to specify the path to the docs folder: + +1. Run `npm run gen-api -- -p -v -a `. +2. Execute `./start` and open up `http://localhost:3000`, as explained in the prior section. + ## Preview the docs in PRs Contributors with write access to this repository can use live previews of the docs: GitHub will deploy a website using your changes.