Markdown Converter
Agent skill for markdown-converter
This repository powers a Hugo site that documents Wordle puzzles. The notes below collect the bits of institutional knowledge future agents usually end up hunting for.
Sign in to like and favorite skills
This repository powers a Hugo site that documents Wordle puzzles. The notes below collect the bits of institutional knowledge future agents usually end up hunting for.
This is Tom's personal Wordle results tracking website built with Hugo. It processes and analyzes daily Wordle game data, storing results as structured markdown files and generating a static site with analytics and reporting.
When running Hugo commands, use
asdf exec to ensure the correct version is used:
asdf exec hugo - Build the static siteasdf exec hugo server - Start local development server with live reloadasdf exec hugo --templateMetrics - Build with template performance metrics (used in CI)Note: If asdf is properly configured in your shell (via
.bashrc or .zshrc), the asdf exec prefix is not needed.
The project uses asdf for tool version management:
0.148.1 in .tool-versions./.tool-versions-setup.sh to install the required Hugo version with asdfasdf execnode static/tools/enhance/enrich-emoji.test.js - Run JavaScript tests for emoji enrichment functionalitycontent/w/YYYY-MM-DD/index.md - Individual puzzle entries with comprehensive game state, statistics, and metadatacontent/*.md - Collection pages for different analysis views (openers, anagrams, contests, etc.)content/a/ - Article pages explaining site functionalitylayouts/ - Hugo templates for rendering contentstatic/tools/ - Client-side JavaScript tools for data processingfunctions/ - Cloudflare Pages Functions for serverless functionalitypublic/ - Generated static site output (not committed)Each puzzle entry contains:
state object - Complete Wordle game state (board, evaluations, solution, settings)stats object - Player statistics at time of puzzle completionp8s format generates plain text metrics fileenableGitInfo = true for commit-based metadatamain branchpuzzle and CI passeshugo-build-profile.yml - Captures Hugo build metrics on PRscontest-label.yml - Adds helper links when PRs are labeled with contestPuzzle data is manually created as markdown files with structured frontmatter containing the complete game state from Wordle.
Common workflow for adding old puzzles that haven't been entered yet:
Input formats accepted:
Automated workflow:
content/w/YYYY-MM-DD/index.mdadd-puzzle/<date>/<number>Required frontmatter structure:
title, date, puzzles, words, openers, middlersstate object with board state, evaluations, solution, game statusstats object with current player statisticstags, contests, hashes, openerHashes, shiftsTests validate puzzle data integrity using both web publishing and executable testing with google/zx.
Special workflow for contest puzzles where multiple players submit data for the same puzzle date.
content/r/)The files in
content/r/ double as Markdown documentation and executable ZX scripts. They are designed to be ad-hoc validation checks that run outside of the standard Hugo build; nothing in the hugo pipeline consumes their exit status. When you add new puzzle analytics, prefer putting the heavy logic inside one of these rules so it can be executed on demand without slowing down site generation.
```js ... ```). When ZX executes a Markdown file it automatically extracts the fenced JavaScript, so you can write plain Node.js inside that block (see guess-count.md for an example) and read the incoming puzzle data from process.stdin.0 for success and 1 (or throw) for failures so callers can gate pipelines on the result.From the project root you can execute any rule by piping puzzle content into
zx:
# Test one puzzle file against the "guess-count" rule cat content/w/198.md | zx content/r/guess-count.md # Run the rule across the whole archive find content/w -name "*.md" ! -name "_index.md" -print0 | \ xargs -0 -I {} sh -c 'cat "{}" | zx content/r/guess-count.md'
If you do not have a global
zx binary, substitute npx zx (or use another package runner) after installing the tool. Because these checks are separate from the Hugo build, it is safe to run them piecemeal while iterating on new logic.
runTests harness pattern.