•5 min read

How I Built a TIL Microblog to Save the Things I'd Otherwise Forget

How I Built a TIL Microblog to Save the Things I'd Otherwise Forget

I learn small things constantly: a git flag I didn't know existed, a CSS trick that solves a layout problem, a Python one-liner that replaces five lines of boilerplate. I used to share these on Mastodon, but they'd get lost in the feed within hours. Writing a full blog post for each one felt like too much overhead.

The solution was a TIL (Today I Learned) section: shorter posts with less formatting, a separate RSS feed, and deliberately low friction for publishing.

Audio Briefing
0:00 / 0:00

The Setup

I added a /til/ route to my Next.js site. Each TIL post is a simple markdown file with minimal frontmatter:

---

title: "Use `git log --oneline --graph` for a compact commit tree"
date: 2026-03-15
tags: ["git"]
---

Running `git log --oneline --graph --all` shows a compact ASCII commit
graph in the terminal. I use this daily now instead of `git log`.

No summary, no hero image, no category: just a title, date, tag, and a few sentences. The low overhead is intentional. If writing a post takes more than two minutes, I won't do it.

Advertisement

Separate RSS Feed

One request I had: let people subscribe to TIL posts separately from full blog posts. In Next.js, I created a separate RSS feed endpoint:

// app/til/feed.xml/route.ts
export async function GET() {
  const posts = getAllTilPosts();
  const feed = generateFeed({
    title: "TIL - Loc's Blog",
    posts,
    feedUrl: `${SITE_URL}/til/feed.xml`,
  });
  return new Response(feed, {
    headers: { 'Content-Type': 'application/xml' },
  });
}

This way, RSS subscribers can choose between everything or just the quick tips.

Automation With a Custom Rake Task

I created a script that generates a new TIL post template from the command line:

npm run til "git log --oneline graph"

This creates a new .md file with the date pre-filled, the title from the argument, and stub content that I just fill in. Removing friction was the key: if I had to remember the file naming convention and frontmatter format each time, I'd stop doing it.

The Philosophy

I stole this idea from Simon Willison's TIL blog. The insight is that most of what you learn isn't worth a full article but is worth writing down. A TIL section captures that middle ground. Over time, these small posts build into a surprisingly useful personal knowledge base.

What Changed

Since adding the TIL section, I write down things I would have let pass before. A fix for a Docker networking issue, a browser devtools trick, a shell alias I keep reusing: each one takes 30 seconds to write and saves me 10 minutes of re-figuring-it-out later.

The weekly mailing list integration is the next step: a brief summary of recent TILs that goes out alongside the regular newsletter.

Zustand vs Jotai State Management Comparison](/en/blog/zustand-vs-jotai-react-state-management)

Advertisement

You Might Also Like

Frequently Asked Questions

A full technical post is typically a deep, long-form essay (800 to 2,500+ words) covering architectural concepts, end-to-end tutorials, and benchmarks. A TIL post consists of concise, atomic technical notes (100 to 300 words) documenting a single command, obscure bug fix, or code snippet without the friction of formal introductions.
In Next.js App Router, create a route handler at app/til/feed.xml/route.ts using a feed generation library like feed. Filter your content collection specifically for type === 'TIL', construct the XML payload containing titles, publish dates, and permalinks, and return the response with Content-Type: application/xml; charset=utf-8 and cache-control headers.
Short posts can risk thin-content flags if indexed indiscriminately without structure. Best practices include: (1) Applying Schema.org TechArticle or HowTo structured data; (2) Grouping related TILs into indexed tag hub pages; (3) Adding canonical URLs; and (4) If a note is extremely brief (under 100 words), embedding it inside a curated monthly roundup or applying robots: noindex until expanded.
Create a simple bash script or Node.js CLI command (e.g., npm run til 'new-post-title') that reads the title, slugifies it into a dated filename (YYYY-MM-DD-title.md), injects frontmatter boilerplate with the current timestamp, and automatically opens the file in your preferred code editor.
Atomic TIL notes are ideal source material for developer social platforms. A single code tip can be automatically formatted into a short code-snippet post on X, a LinkedIn developer insight, or aggregated into a weekly 'What I Learned This Week' newsletter issue using GitHub Actions and markdown parsers.
Share this article:

Stay Updated

Get the latest posts delivered straight to your inbox.

Free Developer Utilities

Free In-Browser Developer Tools

Clean AI CLI logs, build cron expressions, decode JWTs, and calculate chmod permissions offline.

Explore Tools
Advertisement