Fucking Approachable Swift Concurrency is a multilingual static documentation website that teaches Swift concurrency concepts using clear mental models and the "Office Building" analogy. Built with Eleventy (11ty).
Live Site: https://fuckingapproachableswiftconcurrency.com
- Static Site Generator: Eleventy 3.x
- Template Engine: Nunjucks (.njk)
- Content Format: Markdown with embedded HTML
- Styling: Vanilla CSS with CSS custom properties
- Syntax Highlighting: @11ty/eleventy-plugin-syntaxhighlight (Prism)
- Package Manager: pnpm
- Node Version: LTS (managed via mise.toml)
/
├── src/
│ ├── en/index.md # English content
│ ├── uk/index.md # Ukrainian translation
│ ├── ko/index.md # Korean translation
│ ├── ja/index.md # Japanese translation
│ ├── zh-CN/index.md # Simplified Chinese translation
│ ├── zh-TW/index.md # Traditional Chinese translation
│ ├── ar/index.md # Arabic translation (RTL)
│ ├── css/
│ │ └── style.css # Main stylesheet with RTL support
│ ├── images/ # Favicons and images
│ ├── _layouts/
│ │ └── base.njk # HTML base template
│ ├── _includes/ # Reusable components
│ └── _redirects # Language detection redirects
├── _site/ # Build output (generated)
├── eleventy.config.js # Eleventy configuration
├── package.json
└── mise.toml # Tool version management
# Install dependencies
pnpm install
# Development server with live reload
pnpm dev
# Production build
pnpm buildEach language version (e.g., src/en/index.md) contains:
-
Frontmatter with:
layout: base.njktitle: Page title in the languagedescription: SEO descriptionlang: Language code (en, uk, ko, ja, zh-CN, zh-TW, ar)dir: Text direction (ltr or rtl)nav: Navigation labelsfooter: Footer text
-
Content sections (in order):
- Hero section
- TL;DR section
- Isolation basics
- Isolation domains (MainActor, actors, nonisolated)
- How isolation propagates
- Sendable types
- Async/await
- Patterns that work
- Common mistakes
- Compiler errors
- Three levels of Swift concurrency
- Glossary
- Further reading
- Color scheme: Warm palette with Swift orange (#F05138) accent
- Fonts: Playfair Display (serif headings), Inter (body), JetBrains Mono (code)
- Special boxes: Use classes
.analogy,.tip,.warningfor callout boxes - Code highlighting: Isolation domains use colored sidebars (
.code-isolation)
- Create a new folder:
src/{lang-code}/ - Copy
src/en/index.mdto the new folder - Update frontmatter with the new language code and direction
- Translate all content (keep code blocks, HTML structure, and URLs intact)
- Add the language to
eleventy.config.jsin thelanguagesglobal data - Add the language to
_redirectsfor automatic detection - Add appropriate Google Font for the language in
base.njk
For RTL languages (like Arabic):
- Set
dir: rtlin frontmatter - The CSS automatically handles:
- Text direction
- Border positions (left borders become right)
- Flexbox directions
- Sidebar positions
The guide uses the Office Building analogy throughout:
- Office building = Your app
- Offices = Isolation domains
- Front desk = MainActor (UI thread)
- Department offices = Custom actors
- Hallways = Nonisolated code
- Photocopies = Sendable types
- Original documents = Non-Sendable types
- Code blocks are NOT translated - only comments inside code should be translated
- Keep all URLs unchanged when translating
- Maintain HTML structure - classes like
.analogy,.tip,.warningmust remain - Preserve Swift code syntax - never modify actual Swift code
- External links to Matt Massicotte's blog and Apple documentation remain in English
The project uses Playwright for browser testing:
pnpm exec playwright testThe site is designed for deployment on:
- Netlify (supports
_redirectsnatively) - Cloudflare Pages
- GitHub Pages (may need additional configuration for redirects)
The _redirects file handles language-based routing using the Accept-Language header.
The project includes a SKILL.md file at src/SKILL.md that packages the Swift Concurrency knowledge for use with AI coding agents (Claude Code, Cursor, etc.).
When updating content in the language files (especially src/en/index.md), ensure that significant changes are reflected in src/SKILL.md:
- New concepts or mental models
- Updated best practices or recommendations
- New common mistakes or pitfalls
- Changes to the "Office Building" analogy
- Updates related to new Swift versions (e.g., Swift 6.2 Approachable Concurrency)
The skill file should remain a condensed, actionable reference. It does not need to mirror every detail, but should capture the essential guidance that helps developers write correct concurrent Swift code.
The SKILL.md file is served as a static asset at https://fuckingapproachableswiftconcurrency.com/SKILL.md. Users can:
- Download it directly and place it in their agent's skills directory
- Reference it in their agent configuration
- Use it as a personal skill (
~/.claude/skills/swift-concurrency/SKILL.md) - Use it as a project skill (
.claude/skills/swift-concurrency/SKILL.md)
- Original content and mental models inspired by Matt Massicotte's blog
- Built by Pedro Piñera
- In the tradition of fuckingblocksyntax.com and fuckingifcaseletsyntax.com