Content Pipeline Documentation
Overview
The content pipeline processes markdown files from content/ into pre-compiled JSON assets that the Angular app consumes.
Architecture
Pipeline Stages
- Discover (
discover.ts) - Find all.mdfiles, skip_prefixed files - Parse (
parse.ts) - Extract YAML frontmatter and markdown body - Validate (
validate.ts) - Enforce frontmatter schema, fail on errors - Filter (
filter.ts) - Environment-aware content filtering - Enrich (
enrich.ts) - Add computed metadata (reading time, slugs, series) - Transform (
transform.ts) - Convert markdown to HTML with syntax highlighting - Generate (
generate.ts) - Write JSON files, RSS, sitemap
Key Features
- Syntax Highlighting: Shiki with dual themes (light/dark mode)
- Custom Callouts:
:::callout{type="info"}→<div class="jjk-callout" data-type="info"> - Include Directives:
:::include{src="_disclaimer.md"}inlines fragments - Series Auto-Detection: Folders with
_series.yamlauto-tag posts - TOC Generation: Automatic table of contents from headings
- Environment Filtering:
- Development: Include all content, tag drafts/scheduled
- Production: Exclude
draft: trueand future-dated posts
Usage
Build Commands
# Production build (excludes drafts and future posts)
npm run build:content
# Development build (includes everything)
npm run build:content:dev
# Full build (content + Angular)
npm run build
# Development with watch
npm run devContent Structure
content/
├── posts/
│ ├── 2025/
│ │ ├── 01-hello-world.md
│ │ └── 02-draft-post.md
│ └── series-name/
│ ├── _series.yaml # Series metadata
│ └── 01-first-entry.md
├── pages/
│ └── about.md
└── fragments/
└── _disclaimer.md # Reusable snippets
Frontmatter Schema
Required fields:
title(string)date(YYYY-MM-DD)tags(string[], posts only)
Optional fields:
subtitle,updated,draft,cover,excerpt,toc,layout,readingTime,corporateBsLevel
Computed fields:
slug,url,series,seriesOrder,isDraft,isScheduled
Output
Generated files in frontend/src/assets/generated/:
posts/<year>/<slug>.json- Individual post contentpages/<slug>.json- Individual page contentroute-manifest.json- All routes with metadatatag-index.json- Posts grouped by tagseries-manifest.json- Series configurations and postsrss.xml- RSS 2.0 feedsitemap.xml- XML sitemap
Example Post
---
title: "Hello World"
date: 2025-01-15
tags: ["meta", "getting-started"]
excerpt: "A short description"
---
## Heading
Regular markdown content.
:::callout{type="info"}
This is an info callout.
:::
```typescript
function example() {
return "syntax highlighted";
}
```
:::include{src="_disclaimer.md"}
:::