andyreagan.com

Instructions

Welcome to Andy's digital garden / second brain / knowledge base / blog. This all built using Emacs' Org mode. Some files are private, some sections within files are private. You can read more about me in the About Me.

Content organization

Generally I make all of the notes myself. Daily notes are in Notes, with new notes at the bottom having heading heirarchy as Notes > [YYYY] > Daily [<YYYY-MM-DD>]. The <YYYY-MM-DD> latter being an active timestamp (so it shows on org-agenda).

Notes on external resources are organized by day at Blog roll, with some overlap between the private notes above (the difference is that the Notes are private). The format there is Blog roll > Daily [<YYYY-MM-DD>] > [Resource name].

Beyond daily notes and external resources, we generally have notes on bikes, houses, and cars variously scattered around.

The blog posts themselves have format YYYY-MM-DD-[short-name].org, see more complete notes on the blog at How to publish Org mode blog to HTML.

Sync and version control

File syncing and git history are handled separately:

  • Synology Drive syncs the working files (org files, deploy/, static media, etc.) across all machines automatically. The symlink ~/brain points to thenn Synology Drive sync folder.
  • GitHub (andyreagan/brain) stores the git history. Only .org files and the deploy/ directory are tracked.
  • Synology Drive excludes .git directories, so the .git folder is local to each machine.

Setting up git on a new machine

After Synology Drive is syncing ~/brain, initialize git:

cd /tmp
git clone https://github.com/andyreagan/brain.git brain-init
cp -r brain-init/.git ~/brain/.git
rm -rf brain-init
cd ~/brain
git config core.fileMode false   # network share uses 755 for everything
git status                       # should show clean

Then git add, git commit, git push work directly from ~/brain. Generally do this after all changes.

Building and deploying the blog

The blog is published as static HTML and hosted via Docker on the Synology NAS. See deploy/ for all build and hosting configuration:

  • deploy/build-and-deploy.sh — full pipeline: generate blog index, publish org→HTML via Emacs, post-process, deploy to NAS
  • deploy/blog.el — Emacs org-publish configuration
  • deploy/docker-compose-andyreagan.yml — Nginx + Cloudflare tunnel
  • deploy/scripts/create_blog_page.py — generates blog.org and tag_*.org
  • deploy/scripts/process_html.py — post-processes exported HTML

All Python scripts are run with uv (e.g. uv run scripts/create_blog_page.py). Each script declares its dependencies inline via PEP 723 metadata, so uv sets up the environment automatically — no venv activation or pip install needed. Requires uv installed (brew install uv).

Last modified: June 19, 2026