Finally got around to creating a TIL. Was inspired by the prolific Simon Willison's TIL.
I'm using Quarto and host this on Github Pages. Was pretty easy to get started. Just need to install Quarto and I was off and running.
# install quarto
brew install --cask quarto
# create a quarto project that is a blog
quarto create project blog tilYou can also use the Quarto VS extension to do this through the command pallete. The Quarto documentation to create a blog is here. There are multiple ways to publish to Github Pages, I opted to use a Github Action, the instructions are here.
I used to run quarto render and commit the rendered files. Now, this blog is automatically deployed using GitHub Actions whenever changes are pushed to the main branch. Here's how it works:
- The workflow is defined in .github/workflows/publish.yml
- When changes are pushed to
main, GitHub Actions:- Checks out the repository
- Sets up UV (fast Python package installer)
- Sets up Python using the version specified in
.python-version - Installs Jupyter and other dependencies (required for Quarto pages that contain code)
- Sets up Quarto
- Renders the Quarto documents and publishes to the
gh-pagesbranch
The rendered site is then served via GitHub Pages from the gh-pages branch.
To manually trigger deployment:
- Go to the "Actions" tab in the repository
- Select the "Quarto Publish" workflow
- Click "Run workflow" and select the branch to deploy from
To preview the blog locally, run:
quarto preview