Skip to content

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

VitePress documentation site for WPfaker. Covers plugin usage, feature guides, and REST API reference.

Stack: VitePress 1.6.4, Markdown Hosting: Netlify (docs.wpfaker.com) — currently in maintenance mode, auto-builds stopped Node: 18

Build & Dev Commands

bash
npm run docs:dev               # Local dev server with hot-reload (port 5173)
npm run docs:build             # Production build → .vitepress/dist/
npm run docs:preview           # Preview production build

Design

Custom VitePress theme with WPfaker brand colors. Dark mode by default.

Theme files:

  • .vitepress/theme/index.ts — Imports DefaultTheme + custom CSS
  • .vitepress/theme/style.css — Brand color overrides:
    • --vp-c-brand-1: #44CEFF (cyan)
    • Hero gradient: linear-gradient(135deg, #44CEFF, #F200FF) (cyan → magenta)
    • Dark mode variants with slightly brighter values
  • .vitepress/config.mjsappearance: 'dark' (dark mode default)

Content Structure

index.md                       # Home page (hero + feature cards)
changelog.md                   # Version changelog
privacy.md                     # Privacy & data transparency (all external data flows)
guide/                         # Getting started & configuration (5 pages)
├── getting-started.md         # Overview, requirements, key features
├── installation.md            # Install methods, license activation
├── quick-start.md             # First steps tutorial
├── settings.md                # General plugin settings
└── languages.md               # 13 supported locales
features/                      # Feature documentation (11 pages)
├── post-generation.md
├── taxonomy-generation.md
├── user-generation.md
├── templates.md               # Template system (tabbed editor)
├── content-variation.md       # Variation profiles
├── custom-fields.md           # ACF/native field detection
├── ai-detection.md            # AI providers, setup, token costs, Hive
├── images.md                  # Image providers (Picsum, Placeholder)
├── field-detection.md         # 2-tier detection (pattern + AI)
├── history.md                 # Tracking & cleanup
└── bulk-operations.md         # Batch generation, automation
api/                           # REST API reference (6 pages)
├── endpoints.md               # Overview, auth, error codes
├── generation.md              # POST endpoints for content creation
├── templates.md               # Template CRUD
├── information.md             # GET endpoints for CPTs, taxonomies, fields
├── settings.md                # Settings GET/POST
└── history.md                 # History & cleanup endpoints

24 documentation pages total across 3 sections + 2 standalone pages.

Configured in .vitepress/config.mjs. Three sidebars map to guide/, features/, api/ paths. Top nav: Guide | Features | API | Privacy | wpfaker.com | version dropdown (changelog).

Adding Documentation

  1. Create .md file in the appropriate directory (guide/, features/, or api/)
  2. Add the page to the sidebar config in .vitepress/config.mjs
  3. Use VitePress callout blocks: ::: tip, ::: warning, ::: danger, ::: info
  4. Cross-link with relative markdown paths (e.g., [Templates](/features/templates))

Deployment

Netlify (currently offline — maintenance page deployed, auto-builds stopped).

To re-enable:

bash
# Re-enable auto-builds
netlify api updateSite --data='{"site_id":"6a39532e-1377-41c9-af77-6684bdc8908a","body":{"build_settings":{"stop_builds":false}}}'
# Deploy
netlify deploy --prod --build

Netlify Config

  • Site ID: 6a39532e-1377-41c9-af77-6684bdc8908a
  • Build command: npm run docs:build
  • Publish dir: .vitepress/dist
  • Node 18
  • SPA routing via redirect rule in netlify.toml
  • Security headers: X-Frame-Options DENY, X-XSS-Protection, X-Content-Type-Options, Referrer-Policy
  • SEO: noindex, nofollow meta tag (not yet public)
  • WPfaker Plugin (~/Sites/wpfaker3/.../plugins/wpfaker/) — The plugin documented here
  • WPfaker Website (~/Sites/wpfaker-website) — Marketing site (wpfaker.com)
  • WPfaker API (~/Sites/wpfaker-api) — Go backend for license management

Released under the GPL2 License. wpfaker.com