Skip to content

~/colophon

Colophon

How this site works. There is no database and no CMS bill: posts, comments and reactions all live in GitHub issues, an idea borrowed from swyxkit.

Pipeline

  1. 1. writeOpen an issue in the repo. The body is the post, in markdown, with optional frontmatter.
  2. 2. publishAdd the "published" label. A webhook revalidates the site within seconds.
  3. 3. renderunified parses the markdown; Shiki highlights code at build time; React renders the result.
  4. 4. discussComments and reactions are written back to the same issue through GitHub's GraphQL API, as the reader.

Frontmatter

Everything is optional. Without it, the issue title, labels and creation date are used.

---
title: How I built an AI Slack assistant
subtitle: Retrieval, chunking, and not hallucinating
description: Shown in lists, search results and social cards.
slug: ai-slack-assistant      # default: slugified title
date: 2025-03-05              # default: when the issue was opened
updated: 2025-04-01
category: essay               # essay | tutorial | note | snippet
tags: [ai, rag, python]       # default: the issue's other labels
image: https://…/cover.png    # default: a generated card
canonical: https://…          # if it was published elsewhere first
featured: true                # or add a "featured" label
---

GitHub-flavoured markdown plus: syntax highlighting with file titles, line numbers, line and word highlights, diffs and focus; tabbed code groups that remember your choice; automatic npm / pnpm / yarn / bun tabs; GitHub alerts; KaTeX maths; Mermaid diagrams; footnotes; YouTube and X embeds; and raw HTML. The style guide shows every one of them.

Stack

Framework
Next.js 16 (App Router, React Server Components, ISR)
Content
GitHub REST API · gray-matter
Markdown
unified · remark-gfm · rehype-pretty-code + Shiki · KaTeX · Mermaid
Comments
GitHub GraphQL API · GitHub App user tokens in an encrypted cookie
Search
uFuzzy, client-side, over full post text
Styling
Tailwind CSS 4 · Geist & Geist Mono
Feeds
RSS 2.0 and JSON Feed 1.1 with full content
Hosting
Vercel

The source is on GitHub. Fork it.