Node.js utilities for analyzing markdown files in the categories/ and pages/ directories.
Finds markdown files missing specified frontmatter fields.
node scripts/check-metadata.js [field1] [field2] ...
# Check for missing editlink and updatedAt fields (default)
node scripts/check-metadata.js
# Check for specific fields
node scripts/check-metadata.js title layout permalink
# Check single field
node scripts/check-metadata.js updatedAt
Extracts and analyzes all tags used in markdown frontmatter.
node scripts/extract-tags.js [options]
--sort-by-count - Sort by usage count (default)--sort-by-name - Sort alphabetically--detailed - Show which files use each tag--export-json - Export data to valid-tags.json--export-csv - Export statistics to tags-export.csv--help - Show help# Basic tag analysis
node scripts/extract-tags.js
# Alphabetical sorting with detailed file listings
node scripts/extract-tags.js --sort-by-name --detailed
# Export data for further analysis
node scripts/extract-tags.js --export-json --export-csv
Validates all tags in markdown files against approved tags from valid-tags.json.
node scripts/validate-tags.js [path-to-valid-tags.json]
path-to-valid-tags.json - Path to valid tags file (default: valid-tags.json)# Validate against default valid-tags.json
node scripts/validate-tags.js
# Validate against custom tags file
node scripts/validate-tags.js /path/to/custom-tags.json
Generate the tags export file first:
node scripts/extract-tags.js --export-json
Validates all `
` references in markdown files to ensure the post= parameter matches an actual post’s permalink.
node scripts/validate-includes.js
Scans all markdown files in categories/ and pages/ for `
` syntax.
post= value matches a valid permalink from the frontmatter of any markdown file.node scripts/validate-includes.js
permalink in its frontmatterpost= path matches the exact permalink (case-sensitive)post="//")The repository includes a GitHub Action (.github/workflows/markdown-validation.yml) that automatically runs these scripts on pull requests to ensure content quality.
categories/ or pages/Run the same checks locally before pushing:
# Quick validation
node scripts/validate-tags.js
# Full metadata analysis
node scripts/check-metadata.js editlink title
# Generate fresh tags export
node scripts/extract-tags.js --export-json