Jonny Law's Weblog.
This blog is built locally using Quarto.
You can run ./build.sh to build everything in the project.
To preview the site with proper CSS and navigation:
-
Render the entire site:
quarto render
-
Serve the site locally:
python3 -m http.server 8000 --directory _site
-
Open in browser: http://localhost:8000
Alternatively, for live preview (may have Python environment issues):
quarto previewPython environments are managed by uv a super fast Python package and project manager written in rust. Each post which requires Python has it's own environment.
my_post/
├── .venv
├── index.qmd
├── pyproject.toml
└── uv.lock
Create this environment by:
- Initializing the project,
uv init - Populate the dependencies in
pyproject.toml - Create the virtualenv using
uv venv
Quarto will automatically use the virtual environment in the same folder as the .qmd file to run python chunks when running quarto render.
To run Python cells interactively in Positron:
- Open Command Palette (Cmd+Shift+P)
- Select "Python: Select Interpreter"
- Choose the UV environment:
posts/[post-name]/.venv/bin/python - Open the
.qmdfile and run cells with Cmd+Enter
R dependencies are managed by the renv package.