This directory contains development utilities for the Varlyn D&D site.
lint-markdown.js - Validates markdown formatting, headings structure, and consistent stylingtest-structure.js - Validates Varlyn-specific patterns like **TRAIT**. DESCRIPTION, frontmatter schema, TOC consistencyextract-searchable.rb - Extracts searchable content for site search functionality
extract_doc_headings walks every plain markdown heading
(any level, any file under docs/_*/) and indexes it as its own search
entry - no per-content-type markup or file-specific parsing required.
Only plain # ATX headings are matched (not raw <h1>-<h6> HTML tags);
content still using raw HTML headings must be reformatted to markdown to
be indexed (see e.g. the Paladin Oaths conversion).<details> accordion - a
real collapsible UI feature) and familiars (name sits inside a
<table><th> used for monster-stat-block card styling, not a heading).<a name="x"> anchor and
containing other incidental HTML (e.g. a bare <a href="#..."> TOC
link) gets a clean slugified anchor guess, which can differ from the
site’s auto-generated id for that edge case. Affects only the entry’s
in-page scroll target, not which page it links to.validation-utils.js - Shared validation utilities used by multiple toolsAll tools are callable from the Makefile:
make lint-md # Run markdown linter
make test-structure # Run structure validation
make test # Run all validation tools
make test-verbose # Run validation with detailed output
make extract # Extract searchable content
# Validation (Node.js)
node tools/lint-markdown.js # Lint markdown files
node tools/test-structure.js # Test Varlyn structure patterns
# Content Management (Ruby)
ruby tools/extract-searchable.rb # Extract searchable content for site search
Tools are written in Node.js and Ruby and should follow these conventions:
All tools are designed to work within the Docker-based development environment defined in the Makefile.