Thanks for your interest. This is a small project but contributions are welcome — bug reports, feature requests, and PRs.
git clone https://github.com/iwritec0de/wordpress-dev-docs.git
cd wordpress-dev-docs
pnpm install
pnpm testNode 20 or 22 is required. The repo uses pnpm (pinned via packageManager in package.json). Enable it via Corepack (corepack enable) or install directly (npm install -g pnpm).
# One-shot run — exits when the command finishes.
pnpm run dev -- generate ./examples/example-plugin
# Same, but against the theme fixture
pnpm run dev -- generate ./examples/example-theme
# Or the collection fixture
pnpm run dev -- generate ./examples/example-plugin-suite
# Watch mode — reruns on src/ changes. Useful for long-lived commands
# like `preview` or `mcp` while iterating on the CLI code.
pnpm run dev:watch -- preview ./examples/example-pluginGenerated sites are self-contained and don't use pnpm — users run whichever package manager they prefer inside the output directory. cd into <target>/docs-output/ and run npm install && npm run dev (or pnpm install && pnpm run dev) to serve it in a browser.
Before pushing a PR:
pnpm run typecheck
pnpm run lint
pnpm run format:check
pnpm test
pnpm run buildCI runs the same five jobs on Node 20 and Node 22.
mainis protected. All work lands ondevelopvia PRs.- Feature branches:
feature/<short-description>orfeature/<task-id>-<description>. - Bugfixes:
bugfix/<short-description>.
src/
cli/ # Ink CLI app + commands (generate, init, validate, preview, mcp)
parser/ # PHP, JS, CSS parsers + WordPress-specific extractors
generator/ # Site scaffold + MCP reference builder
config/ # Config schema (Zod) + loader
overrides/ # User-supplied tip/code overrides loader + merge engine
validator/ # Source validation rules
mcp-server/ # MCP server runtime (HTTP)
lib/ # Small shared helpers
packages/
site-template/ # Next.js 16 site template + 8 built-in skins
examples/
example-plugin/ # Single WordPress plugin fixture
example-theme/ # WordPress block theme fixture
example-plugin-suite/ # Plugin collection fixture
- Add the extraction logic under
src/parser/<php|js|css>/orsrc/parser/wordpress/for WP-specific patterns. - Add a test alongside in
__tests__/. - If the output needs to surface in the generated site, update
src/generator/site/nav.tsand the relevant page underpackages/site-template/template/app/. - If it needs to surface in the MCP reference, update
src/generator/mcp/and the MCP server routes insrc/mcp-server/.
- Create
packages/site-template/skins/<name>.jsonfollowing the shape ofdefault.json. - Add the name to
BUILT_IN_SKINSinsrc/generator/site/tokens.ts. - Add tests under
src/generator/site/__tests__/tokens.test.tsfor any unusual token values.
Skin tokens are validated against a Zod schema — xl radius and dark overrides are optional.
Tests live next to their source in __tests__/ directories, named *.test.ts or *.test.tsx. We use Vitest. Run a single file with npx vitest run <path>.
Conventional-style prefixes are preferred but not required: feat:, fix:, chore:, docs:, test:, refactor:. Include scope when helpful: feat(parser): …, fix(site-template): ….
- Bugs: include the command run, the expected vs actual output, and the plugin/theme structure (sanitized) that reproduces it.
- Features: describe the use case first, not the implementation.
By contributing you agree that your contributions will be licensed under the repository's MIT license.