Taiwan.md Knowledge Base
Skill by ara.so — Daily 2026 Skills collection.
Taiwan.md is an open-source, AI-native knowledge base about Taiwan built with Astro v5. It uses a Single Source of Truth (SSOT) architecture where all content lives in the knowledge/ directory as Markdown files, and the website is a build-time projection. Features include bilingual support (Traditional Chinese as default + English), an interactive D3.js knowledge graph, and 96+ curated articles across 12 categories.
Installation & Setup
Prerequisites
- Node.js 18+
- npm or pnpm
Clone and Install
Development Server
Build & Preview
Sync Knowledge to Content
Project Architecture
Critical rule: Never edit files in src/content/ directly. Always edit knowledge/ and run scripts/sync.sh.
Content Structure
The 12 Categories
Article File Naming
Writing Articles
Chinese Article Template (knowledge/[Category]/article-slug.md)
English Article Template (knowledge/en/[Category]/article-slug.md)
Hub Page Template (knowledge/[Category]/_Hub.md)
Frontmatter Reference
Required Fields
Optional Fields
Adding Images (Wikimedia Commons Policy)
All images must be from Wikimedia Commons with verified CC licenses. Cache them locally:
Image attribution format in frontmatter:
Knowledge Graph Integration
Articles automatically appear in the D3.js knowledge graph at /graph. Nodes are created from articles; edges are created from shared tags and cross-references.
Linking Articles
Reference other articles within content using relative paths:
Tagging for Graph Connections
Use consistent tags to create knowledge graph bridges:
Sync Workflow
After editing any file in knowledge/, always sync before building:
Three-Layer Depth Pattern
Every article should follow this structure for AI-readability and varied reading levels:
Contributing via PR
Full PR Workflow
Commit Message Convention
AI-Native Features
llms.txt
The site exposes /llms.txt for AI consumption. When writing content, use structured headers that AI can parse:
Meta AI Summary Tag
Pages include <meta ai-summary> — write descriptions that work as standalone AI context:
Astro Page Patterns
Category Page (src/pages/[category].astro)
Bilingual Route Pattern
Content Quality Checklist
Before submitting a PR, verify:
- Both
knowledge/[Category]/article.md(zh-TW) andknowledge/en/[Category]/article.md(en) exist - All
sourcesentries have clickableurlfields (no plain-text-only references) - Article follows three-layer depth: 30-sec → deep dive → why it matters
- Images sourced from Wikimedia Commons with proper
imageCaptionattribution -
categoryslug matches one of the 12 valid categories exactly -
bash scripts/sync.sh && npm run buildcompletes without errors - Factual claims are verified against cited sources
Troubleshooting
Build fails after adding article
Article not appearing in knowledge graph
English article not showing at /en/...
Images not loading
Sync script permission error
Resources
- Live site: https://taiwan.md
- Knowledge graph: https://taiwan.md/graph
- Contribute guide: https://taiwan.md/contribute
- llms.txt: https://taiwan.md/llms.txt
- License: CC BY-SA 4.0 (content) + MIT (code)
- Contact: [email protected]


