Skip to content

Commit

Permalink
add debug configs for local dev preview (#17)
Browse files Browse the repository at this point in the history
* add debug configs for local dev preview

Co-authored-by: Julia Silge <[email protected]>
  • Loading branch information
sharon-wang and juliasilge authored Nov 6, 2024
1 parent 5c78a47 commit 8ce5252
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Preview Docs (Chrome)",
"request": "launch",
"runtimeArgs": [
"preview"
],
"runtimeExecutable": "quarto",
"skipFiles": [
"<node_internals>/**"
],
"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": [
"<node_internals>/**"
],
"type": "node",
"serverReadyAction": {
"action": "debugWithEdge",
"pattern": "Browse at http://localhost:(\\d+)",
"uriFormat": "http://localhost:%s",
"killOnServerStop": true
}
}
]
}
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 8ce5252

Please sign in to comment.