From 8ce52520d000c1033da4e7b9605cf5298ba77396 Mon Sep 17 00:00:00 2001 From: sharon Date: Wed, 6 Nov 2024 13:16:01 -0500 Subject: [PATCH] add debug configs for local dev preview (#17) * add debug configs for local dev preview Co-authored-by: Julia Silge --- .vscode/launch.json | 41 +++++++++++++++++++++++++++++++++++++++++ README.md | 10 ++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8f7f2b9 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,41 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Preview Docs (Chrome)", + "request": "launch", + "runtimeArgs": [ + "preview" + ], + "runtimeExecutable": "quarto", + "skipFiles": [ + "/**" + ], + "type": "node", + "serverReadyAction": { + "action": "debugWithChrome", + "pattern": "Browse at http://localhost:(\\d+)", + "uriFormat": "http://localhost:%s", + "killOnServerStop": true + } + }, + { + "name": "Preview Docs (Edge)", + "request": "launch", + "runtimeArgs": [ + "preview" + ], + "runtimeExecutable": "quarto", + "skipFiles": [ + "/**" + ], + "type": "node", + "serverReadyAction": { + "action": "debugWithEdge", + "pattern": "Browse at http://localhost:(\\d+)", + "uriFormat": "http://localhost:%s", + "killOnServerStop": true + } + } + ] +} diff --git a/README.md b/README.md index b5d209e..fa2334e 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,13 @@ This project uses [Vale](https://vale.sh/docs/) for automated linting and compli - If you are an external contributor, we as reviewers will take responsibility for compliance with the guidelines. Thank you for being willing to improve our docs! Vale runs [via GH action on PRs](https://github.com/posit-dev/positron-website/actions/workflows/lint.yml), but you can also run it locally before you submit a PR if you have [installed Vale](https://vale.sh/docs/vale-cli/installation/) locally. Run `vale .` from the root directory of this project to lint the `.qmd` files used to build to site. + +## Local development + +If you have Quarto and Chrome or Edge installed locally, you can preview the site by running one of the Debug Configurations in VS Code or Positron. + +The configurations run `quarto preview` and then open the site in a new browser window. +- **Preview Docs (Chrome)**: Preview the site in Chrome +- **Preview Docs (Edge)**: Preview the site in Edge + +The site will re-render as you make changes to the `.qmd` files.