Skip to content

lborruto/docs

Repository files navigation

Today I Learned

A collection of concise write-ups on small things I learn day to day. Powered by Datasette and deployed automatically to Fly.io via GitHub Actions.

Search these TILs at https://docs.luca-borruto.com/

12 TILs so far. Atom feed here.

homelab

pc

links


How It Works

  1. Write a Markdown file in a topic folder (e.g. python/my-trick.md).
  2. Push to main -- GitHub Actions builds a SQLite database, updates this README, and deploys a Datasette instance to Fly.io.
  3. Browse the live site with full-text search, topic browsing, Atom feeds, and a GraphQL API.

Key Components

File Purpose
build_database.py Scans */*.md files, renders Markdown via GitHub API, stores in SQLite
update_readme.py Regenerates README index from the database
metadata.yaml Datasette configuration: title, feeds, search queries, plugins
templates/ Custom Datasette HTML templates
plugins/ Custom Datasette plugins

Setup

Prerequisites

Deploy

  1. Create a Fly app:
    fly apps create your-app-name
  2. Get a deploy token:
    fly tokens create deploy -a your-app-name
  3. Add these to your GitHub repo:
    • Secret FLY_TOKEN -- the deploy token from step 2
    • Variable FLY_APP_NAME -- your app name from step 1 (Settings > Secrets and variables > Actions)
  4. Push to main -- the workflow handles the rest.

Custom Domain

To point docs.yourdomain.com at your Fly app:

  1. Add a CNAME in your DNS: docs -> your-app-name.fly.dev.
  2. Add the certificate in Fly:
    fly certs create docs.yourdomain.com -a your-app-name

How to Write a TIL

Each TIL is a GitHub-Flavored Markdown file inside a topic folder:

topic-name/my-til-title.md

The folder name becomes the topic, the filename (minus .md) becomes the slug.

The only requirement is that the file starts with a # Title on the first line -- this is extracted as the TIL title. Everything after it is the body.

# Title of Your TIL

Content goes here.

Tips

  • Keep TILs short and focused on a single concept.
  • Use descriptive filenames with hyphens: parsing-json-with-jq.md.
  • Use lowercase for topic folder names: python/, github-actions/, docker/.
  • The first paragraph is used as the summary/preview on the website.
  • Dates are extracted automatically from git history -- no need to add them manually.

About

personal documentation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors