Thought Foundry is a personal knowledge base and digital garden built with Eleventy. It publishes notes, book reviews, and articles — primarily sourced from YouTube/podcast transcripts — as a static site with full-text search and Chinese language support.
This repository contains only the build system. Content lives in a separate repo:
| Repo | Role | Visibility |
|---|---|---|
austery/thought-foundry |
Eleventy templates, CSS, JS, GitHub Actions | Private |
austery/thought-foundry-content |
All Markdown content (notes, posts, books, subtitles) | Public |
austery/austery.github.io |
Rendered HTML output (deploy target) | Public |
Content is wired as a git submodule at src/content/. CI fetches it via shallow clone at build time — no submodule pointer updates needed.
thought-foundry/
├── src/
│ ├── content/ # ← git submodule (thought-foundry-content)
│ │ ├── notes/ # ~5,200 video transcript notes
│ │ ├── posts/ # ~149 articles
│ │ └── books/ # book reviews
│ ├── _includes/ # Nunjucks templates
│ ├── css/ # Theme variables, components, layouts
│ └── js/ # Theme toggle, table of contents
├── .eleventy.js # Build configuration
└── .github/workflows/ # GitHub Actions (hourly build + deploy)
- Node.js 18+
- Git
git clone https://github.com/austery/thought-foundry.git
cd thought-foundry
git submodule update --init --recursive # pull content
npm installnpm run dev
# or
npx @11ty/eleventy --serveSite available at http://localhost:8080/ with hot-reloading.
npm run buildOutput in _site/. Also generates Pagefind search index.
npm run build:debugEnables verbose logging: conflict detection reports for tags, speakers, and entities.
Content is managed in austery/thought-foundry-content. New notes are auto-generated by puresubs from YouTube/podcast audio via the automation-engine-ytdlp service.
To edit content locally, work inside src/content/ (which is a checkout of thought-foundry-content).
Submodule refresh (pull latest content):
git submodule update --remote src/contentGitHub Actions deploys automatically:
- Hourly at
:05— picks up new content fromthought-foundry-content - On push to main — for template/CSS/JS changes
CI workflow:
- Checkout site code (this repo)
- Shallow-clone
thought-foundry-content→src/content/(deletesraw_subtitles/,cleaned_subtitles/to save disk) npm ci+npm run build- Deploy
_site/toaustery/austery.github.iovia SSH deploy key
- Pinyin Slugification: Chinese titles → readable URLs via cached pinyin conversion (
.eleventy-cache.json) - Entity Normalization: Deduplicates similar names (e.g., "Donald Trump" vs "donald-trump") with scoring system
- Full-Text Search: Pagefind static search with Chinese language support
- Speaker System: Dedicated speaker pages with conflict-resolved slugs
- Content Exclusion:
exclude: truein frontmatter hides from all listings/search while still generating HTML - Series Grouping:
seriesfield groups related content with automatic related-posts display - Internal Tags: Tags like
视频文稿preserved in data but hidden from public display - Dark/Light Mode: Persistent theme with system preference detection
- Table of Contents: Auto-generated from headings
---
title: "Post Title"
date: "YYYY-MM-DD"
layout: "post.njk" # or "book-note.njk" for books
speaker: "Speaker Name" # comma-separated for multiple
guest: "Guest Name"
category: "Category"
area: "Area"
series: "Series Name" # groups related content
summary: "Content description" # shown with 📄 icon
insight: "Personal reflection" # shown with 💡 icon
exclude: true # hides from listings/search (still generates HTML)
tags:
- tag1
- 视频文稿 # internal tag — hidden from public display
---Located in scripts/. These operate on content at src/content/ (the submodule checkout):
| Script | Purpose | Status |
|---|---|---|
update_speaker_author.py |
Rename speaker/author across all files | Active |
fix_malformed_yaml.py |
Repair broken frontmatter | Active |
frontmatter_audit.py |
Audit missing/malformed fields | Active |
batch_processor.py |
Generic frontmatter field updates | Active |
tag_processor.py / consolidate_tags.py |
Tag replacement and merging | Active |
knowledge_migration.py / migrate_areas.py |
One-time migration scripts | Archive |
Usage example:
python3 scripts/update_speaker_author.py "Old Name" "New Name" --dry-runNote: Scripts target
src/content/(submodule). After running, commit changes insrc/content/as a separate commit tothought-foundry-content.
| Metric | Value |
|---|---|
| Build time | ~60s local, ~7 min CI |
| Content pages | 19,100+ |
| Pinyin cache hit rate | ~100% (46k entries) |
| Search index | Pagefind distributed (no single large file) |
- Eleventy — static site generator
- Nunjucks — templates
- Pagefind — static search with Chinese support
- pinyin — Chinese → URL slug conversion
- GitHub Actions — CI/CD