Reusable pipeline for publishing markdown articles through a Medicine Wheel–themed web interface, with Four Directions visual categorization and server-side filesystem scanning.
Version: 0.1.0 Status: Active Package: Shared pattern (@medicine-wheel/ui-components + consuming app) Lineage: Derived from Miadi articles system integration with medicine-wheel ui-components
A standardized pipeline for:
---
title: string # Required — article title
author: string # Required — author name
date: string # Publication year or ISO date
tags: string[] # Topic tags for filtering
direction: enum # east | south | west | north
abstract: string # 200-char summary for card display
id?: string # Optional unique identifier
---
| Direction | Icon | Border Color | Background | Semantic |
|---|---|---|---|---|
| East 🌅 | 🌅 | yellow-400 | yellow-50 | Vision, requirements, envisioning |
| South 🔥 | 🔥 | red-400 | red-50 | Analysis, research, growth |
| West 🌊 | 🌊 | blue-400 | blue-50 | Validation, testing, reflection |
| North ❄️ | ❄️ | white/gray | gray-50 | Action, implementation, wisdom |
// Server component reads filesystem directly (no API needed for listing)
import fs from 'fs';
import matter from 'gray-matter';
function getAllArticles(dir: string): Article[] {
return fs.readdirSync(dir)
.filter(f => f.endsWith('.md'))
.map(f => {
const { data, content } = matter(fs.readFileSync(path.join(dir, f), 'utf-8'));
return { slug: f.replace(/\.md$/, ''), ...data, content };
});
}
<safename>-<YYMMDDHHmm>.md
Where safename = title slugified (lowercase, hyphens, alphanumeric only).
title, directioneast, south, west, north.mdThe DirectionCard component from @medicine-wheel/ui-components provides the canonical Four Directions visual vocabulary. Consuming apps should:
DirectionCardgray-matter — YAML frontmatter parsingreact-markdown + remark-gfm — Markdown rendering@medicine-wheel/ui-components — Direction theming reference@medicine-wheel/ontology-core — Direction type definitions