Skip to content

Documentation maintenance

How to keep docs/ aligned with the plugin. Use the Cursor slash command /update-docs (see .cursor/commands/update-docs.md) to run this checklist in a session.

Markdown pages live under docs/src/content/docs/ (Starlight content collection):

docs/
├── package.json
├── astro.config.mjs
├── docs.config.mjs
└── src/
└── content/
└── docs/
├── README.md
├── codebase/
│ ├── README.md
│ ├── use-cases-and-output-profiles.md # canonical architecture
│ ├── php-backend.md
│ ├── rest-api.md
│ ├── hooks-and-extension-points.md
│ ├── blocks-and-editor.md
│ ├── examples.md
│ ├── docs-maintenance.md
│ └── image-placeholders.md
└── user-guide/
├── README.md
├── installation.md
├── getting-started.md
├── templates.md
├── editor/
│ ├── README.md
│ ├── template-editor.md
│ └── blocks.md
├── use-cases/
│ ├── README.md
│ ├── how-to-configure.md
│ ├── opengraph.md
│ ├── sidebar-image.md
│ ├── minimal.md
│ └── custom-use-case.md
├── caching/
│ ├── README.md
│ └── clearing-cache.md
├── faq.md
└── troubleshooting.md
SituationAction
Claim not in includes/, src/, schemas/, or root README.mdDelete the doc or section (no archive, no redirect stubs)
Codebase reference driftSync to code; remove wrong paragraphs entirely
User-facing workflowRewrite user-guide/ from root README.md
Product naming / UX onlyConsult knowledge/ — not for API facts

Starlight page titles: Use title in frontmatter for the visible page headline (browser tab, OG title, sidebar). Do not add a matching # heading in the body — Starlight already renders the title as <h1>. Start page content with intro copy or ## sections.

Do not maintain separate docs/api/, docs/hooks/, docs/classes/, docs/migration/, or docs/chat-logs/.

  1. use-cases-and-output-profiles.md — use case architecture
  2. Plugin README on GitHub — site-owner features and quick start
  3. coverkit.php, includes/class-coverkit-*.php, includes/functions.php
  4. includes/class-coverkit-rest.php — REST routes
  5. src/editor/use-cases/ — editor mapping UI

Extract routes:

Terminal window
rg 'register_rest_route' includes/class-coverkit-rest.php

Extract hooks:

Terminal window
rg "do_action\('coverkit_|apply_filters\('coverkit_" includes/

Stale-term grep (must be zero under docs/)

Section titled “Stale-term grep (must be zero under docs/)”
PatternNote
coverkit_use_cases without leading _Meta key is _coverkit_use_cases
register_coverkit_use_caseUse coverkit_register_use_case()
inject_opengraph_meta, sync_active_use_cases, boot_wordpress_outputsRemoved; OG via Open_Graph_Image_Use_Case
coverkit_active_use_cases (template ID lists)Loader option is coverkit_active_use_case_classes
Data_Collector, Handler_Registry, generate_from_templateRemoved concepts
Renderer::___generateUse Renderer::generate()
includes/handlers/, includes/runtime/Removed directories
docs/api/, docs/hooks/, stale-docs-audit, chat-logs/Deleted paths

When a doc needs a screenshot that does not exist yet:

  1. Use descriptive Markdown alt text (what the image should show).
  2. Add a *Placeholder: …* caption line.
  3. Log the entry in image-placeholders.md with status placeholder.

Do not add decorative placeholders.

User guide and codebase reference in docs/ are built and published to docs.coverkit.com via the Astro + Starlight app in this folder (package.json, astro.config.mjs, src/).

TaskCommand
Local previewnpm run docs:dev (from plugin repo root) or npm run dev in docs/
Production buildnpm run docs:build or npm run build in docs/

Edit markdown in src/content/docs/ (user-guide/, codebase/, and README.md). Internal links may use GitHub-style .md paths (for example user-guide/getting-started.md); the docs build rewrites them to site URLs automatically. Pushes to main or develop that touch docs/ or the docs deploy workflow trigger a Cloudflare Pages deploy automatically.

For commits that change docs, create feature/docs-sync-YYYY-MM-DD from the default branch unless the user says “no branch” or “on develop”.

  • Stale-term grep returns no matches in docs/
  • No markdown links to deleted paths (grep repo for docs/api, docs/hooks, field-mapping-system, etc.)
  • rest-api.md lists every register_rest_route in class-coverkit-rest.php
  • docs/src/content/docs/README.md links only to files that exist
  • Every docs/assets/images/... placeholder has a row in image-placeholders.md