Working Notes: a commonplace notebook for recording & exploring ideas.
Home. Site Map. Subscribe. More at expLog.
Just for posterity, here's an older version of the about page that described the slipbox I'd originally published on explog.
The current site is much simpler, though I've maintained some old habits:
The main page of knlb.dev explains why this website exists.
The current version of this site is generated by a 500 line python file (with inline html and CSS for all the formatting) relying on uv for execution with the prefix:
#!/usr/bin/env -S uv run --script
# -*- mode: python -*-
#
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "pyyaml", "flask", "markdown-it-py",
# "linkify-it-py", "mdit-py-plugins"
# ]
# ///
The corresponding github action to publish it is:
name: Build and Deploy Notebook
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python
run: uv python install
- name: Build site
run: ./bind -p ./pages -o ./build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
— Kunal