Skip to content

austery/thought-foundry

Repository files navigation

Thought Foundry

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.

Repository Architecture

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)

Getting Started

Prerequisites

  • Node.js 18+
  • Git

Installation

git clone https://github.com/austery/thought-foundry.git
cd thought-foundry
git submodule update --init --recursive   # pull content
npm install

Development Server

npm run dev
# or
npx @11ty/eleventy --serve

Site available at http://localhost:8080/ with hot-reloading.

Production Build

npm run build

Output in _site/. Also generates Pagefind search index.

Debug Build

npm run build:debug

Enables verbose logging: conflict detection reports for tags, speakers, and entities.

Content Management

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/content

Deployment

GitHub Actions deploys automatically:

  • Hourly at :05 — picks up new content from thought-foundry-content
  • On push to main — for template/CSS/JS changes

CI workflow:

  1. Checkout site code (this repo)
  2. Shallow-clone thought-foundry-contentsrc/content/ (deletes raw_subtitles/, cleaned_subtitles/ to save disk)
  3. npm ci + npm run build
  4. Deploy _site/ to austery/austery.github.io via SSH deploy key

Features

  • 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: true in frontmatter hides from all listings/search while still generating HTML
  • Series Grouping: series field 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

Frontmatter Reference

---
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
---

Python Utility Scripts

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-run

Note: Scripts target src/content/ (submodule). After running, commit changes in src/content/ as a separate commit to thought-foundry-content.

Performance

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)

Tech Stack

About

some notes and thought

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors