Just The Docs Front Matter — Design Spec
Date: 2026-03-30 Branch: feature/front-matter Status: Approved
Overview
Add Just The Docs (JTD) YAML front matter to all content .md files in the repository. Create a new root index.md as the JTD home page, rewrite README.md as a lean GitHub-facing file, standardize backlinks, and update _config.yml time format. A reusable Python script handles the bulk operation.
File Classification
Three categories:
| Category | Files | Treatment |
|---|---|---|
| Untouched | CLAUDE.md, docs/superpowers/**/*.md | No edits whatsoever |
| Excluded | README.md, CONTRIBUTING.md, CONTRIBUTORS.md, STRUCTURE.md, CHANGELOG.md, bs-front-matter.md | Front matter with nav_exclude: true + search_exclude: true only |
| JTD pages | New root index.md, all subdirectory index.md and leaf .md files (~149 files) | Full front matter |
Front Matter Schema
Root index.md (new home page)
---
title: "Illegitimis' Dev Mnemonics"
layout: home
nav_order: 1
description: "Dev documentation, tutorial, memory pointers, inverse oblivion"
permalink: /
last_modified_date: 2026-03-30 00:00:00 +00:00
---
Category index.md (e.g. dotnet/index.md)
---
title: .NET
layout: minimal
nav_order: 1
has_children: true
last_modified_date: 2025-12-15 09:41:23 +00:00
---
Subcategory index.md (e.g. dotnet/parallelism/index.md)
---
title: Parallelism
layout: minimal
nav_order: 3
parent: .NET
has_children: true
last_modified_date: 2025-11-02 17:08:44 +00:00
---
Leaf pages (e.g. dotnet/parallelism/managed-threads.md)
---
title: Managed Threads
layout: default
nav_order: 2
parent: Parallelism
grand_parent: .NET
last_modified_date: 2025-10-20 08:12:55 +00:00
---
Excluded root files (e.g. CONTRIBUTING.md)
---
nav_exclude: true
search_exclude: true
---
Front Matter Field Rules
title— extracted from existing H1 heading in file contentlayout—homefor rootindex.md,minimalfor all otherindex.mdfiles,defaultfor leaf pagesnav_order— starts at 1 everywhere. Root-level categories use the order fromREADME.mdlink list: .NET (1), Architecture (2), Data (3), Web Services (4), Azure (5), Distributed Systems (6), Testing (7), JavaScript (8), DevOps (9). Within subfolders: alphabetical by H1 title, starting at 1last_modified_date— UTC datetime fromgit log -1 --format="%ai"converted toYYYY-MM-DD HH:MM:SS +00:00. New files (no git history) use2026-03-30 00:00:00 +00:00has_children: true— on anyindex.mdthat has child pages beneath itparent— title string of the parentindex.md(omitted for root-level pages)grand_parent— title string of the grandparentindex.md(only for depth-3 pages)description— only on rootindex.mdpermalink: /— only on rootindex.md
README.md Restructuring
New root index.md
Receives the current README.md content:
- H1 title “Illegitimis’ Dev Mnemonics”
- Category link list (.NET, Architecture, Data, etc.)
- Full JTD
homelayout front matter
Rewritten README.md
Lean GitHub-facing file:
# Dev Mnemonics
A Jekyll-based documentation site covering software development topics —
C#/.NET, architecture, data, web services, Azure, distributed systems,
testing, JavaScript, and DevOps.
## Live Site
[illegitimis.github.io/Tutorial](https://illegitimis.github.io/Tutorial/)
## Local Development
```bash
gem install jekyll bundler
jekyll serve
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
## Resources
- [Wiki](https://github.com/illegitimis/Tutorial/wiki) — legacy documentation
Gets nav_exclude: true + search_exclude: true front matter.
Backlink Standardization
Current pattern (varies by file):
[<<](./index.md) | [home](../../README.md)
New standardized format:
[<](./index.md) | [<<](/index.md)
Rules:
[<](./index.md)— parentindex.mdin the same folder[<<](/index.md)— root home page- Remove all
[home](...README.md)variants - Root
index.md— no backlinks - Category
index.mdfiles (e.g.dotnet/index.md) — only[<<](/index.md), no[<] - Files without existing backlinks — leave as-is
- Script uses regex to match all backlink variants
Config Change
In _config.yml:
# From:
last_edit_time_format: "%b %e %Y at %I:%M %p"
# To:
last_edit_time_format: "%Y-%m-%d %H:%M:%S"
Python Script
Location: docs/superpowers/scripts/add_front_matter.py
Responsibilities:
- Run a single bulk
git logcommand upfront to collect last-modified UTC datetimes for all tracked.mdfiles. Cache results in a dict keyed by file path. This query runs once, not per file. - Walk all
.mdfiles from repo root - Classify each file (untouched / excluded / JTD page)
- Extract H1 title from file content
- Look up last-modified datetime from the cached dict (new/untracked files get
2026-03-30 00:00:00 +00:00) - Determine hierarchy (
parent,grand_parent,has_children) from folder structure - Compute
nav_order— root children from README link order, subfolders alphabetical by title - Prepend front matter block
- Fix backlinks per standardization rules
- Support
--dry-runflag for preview without modification
Does NOT handle:
- Creating root
index.md(manual) - Rewriting
README.md(manual) - Updating
_config.yml(manual)
Artifacts
| Artifact | Location |
|---|---|
| Design spec | docs/superpowers/specs/2026-03-30-front-matter-design.md |
| Implementation plan | docs/superpowers/plans/ |
| Python script | docs/superpowers/scripts/add_front_matter.py |
| Final report | docs/superpowers/reports/ |