ExtantApe

payload plugin docs

by ExtantApe
Publishing workflow
v3
^3.80.0
MIT

Overview

Summary generated from the README

Creates and maintains a documentation page for every feature supplied by one or more sources, using hooks and a nightly sync. Drafts come from your own generator function, pages require reviewer approval before publishing, and a lint blocks internal details such as paths, keys and hosts. Requires the MongoDB adapter, edit and review access functions, and at least one feature source.

Features

  • Draft page per feature from a source list, marked out of date when the feature changes
  • Removed features are archived and pages cannot be deleted
  • Publish-time lint for env names, file paths, IPs, key-like strings and private terms
  • Reviewer approval that is cleared when title, summary, body, section or path change
  • checkDocs report for missing, outdated, duplicate and broken-link pages
  • docsTree and docsPage helpers return published Markdown pages for your docs routes

Use cases

  • Generate and maintain help-center pages for each product feature
  • Block internal details from reaching public documentation
  • Verify before release that every listed feature has a published page

From the author

Docs for Payload: a docs page for every feature your site lists, made and kept up to date by hook, with hand-written pages beside them, a publish-time lint for internals, and a check that nothing is missing.

Installation

npm i @extantape/payload-plugin-docs

0

Stars

0

Forks

0

Open Issues

6 days ago

Last Updated

375

Weekly Downloads

v0.1.1

npm Version

38.9 KB

Unpacked Size

0

Dependencies

GitHub stars

00 since Nov 8

Show data
GitHub stars by day (UTC)
DateStars
Dec 5, 20260
Dec 4, 20260
Dec 3, 20260
Dec 2, 20260
Dec 1, 20260
Nov 30, 20260
Nov 29, 20260
Nov 28, 20260
Nov 27, 20260
Nov 26, 20260
Nov 25, 20260
Nov 24, 20260
Nov 23, 20260
Nov 22, 20260
Nov 21, 20260
Nov 20, 20260
Nov 19, 20260
Nov 18, 20260
Nov 17, 20260
Nov 16, 20260
Nov 15, 20260
Nov 14, 20260
Nov 13, 20260
Nov 12, 20260
Nov 11, 20260
Nov 10, 20260
Nov 9, 20260
Nov 8, 20260
npm weekly downloads

412+412 since Nov 14

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 5, 2026412
Dec 4, 2026567
Dec 3, 2026597
Dec 2, 2026601
Dec 1, 2026431
Nov 30, 2026469
Nov 29, 2026549
Nov 28, 2026500
Nov 27, 2026324
Nov 26, 2026265
Nov 25, 2026226
Nov 24, 2026180
Nov 23, 2026143
Nov 22, 2026217
Nov 21, 2026214
Nov 20, 2026212
Nov 19, 2026212
Nov 18, 2026208
Nov 17, 2026196
Nov 16, 2026181
Nov 15, 20260
Nov 14, 20260

Each point is npm's rolling 7-day download count.

Health Score

78/100Excellent

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1453672049-root.svg)](https://payloaddirectory.dev/plugins/1453672049-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1453672049-root"><img src="https://payloaddirectory.dev/badge/1453672049-root.svg" alt="Payload Directory"></a>
Updated Nov 29, 2026Created Nov 11, 2026Published Nov 29, 2026

README

payload-plugin-docs

Docs for Payload: a docs page for every feature your site lists, made and kept up to date by hook, with hand-written pages beside them, a publish-time lint for internals, and a check that nothing is missing.

Status: 0.1.1 is the latest release (see CHANGELOG.md). 25 tests pass against Payload 3.92 with an in-memory MongoDB replica set and a fake generator (no AI is called). They cover pages following features, the lint, reviews, publishing rules, public access, the check and the tree. No site uses it yet.

What it does

  • Sources that fail or come back empty leave their pages alone, and the check reports them. A failed draft is tried again at the next sync.

  • A page for every feature. Features come from one or more sources: a few lines each, from a roadmap plugin's catalog or your own list.

    • A source calls onFeatureChange from its own hook. syncDocs(payload), nightly, reads every source and catches anything a hook missed.
    • A new feature gets a draft page.
    • When a feature's words change, its page is marked out of date. A fresh draft waits beside the published words until it's reviewed and published.
    • A removed feature's page is archived, never deleted. Nobody can delete a page.
    • A planned feature gets a short page that starts "Planned. This is what we intend to build. There's nothing to use yet."
  • Drafts come from your generator (generate), given the feature's own fields and, if you give uiTextFor, the user-facing text of its pages.

    • Docs never reads source code, config or the schema, and never calls an AI itself.
    • If the generator fails, the page is still made and marked out of date.
    • Without a generator, the feature's summary and details are used.
  • Hand-written pages (kind: 'extra') sit in the same sections.

  • Nothing internal goes public. Publishing is refused if a page's title, summary or body has any of these:

    • environment variable names or file paths;
    • IP addresses or internal hosts;
    • key-like strings;
    • your collection names written like code;
    • your private terms.

    allow lets public names through (YouTube, Stripe).

  • Reviews:

    • Only reviewers (access.review) review, and a page is approved only when the reviewer ticks approved. A note alone approves nothing.
    • An approval holds only for the words it saw: the section, path, title, summary and body. Editing any of them clears it.
    • Publishing an approved page clears its out-of-date flag.
    • A page can't be published unreviewed, so editing a published page's words means a draft and a new review.
  • checkDocs(payload), for a nightly job and your pre-release step, lists:

    • features with no page;
    • out-of-date pages;
    • features whose page isn't published, planned ones included, so /docs always holds at least everything in Features;
    • two pages for one feature, or two pages on one path;
    • a source that failed, or returned nothing while it has pages;
    • /docs links that go nowhere;
    • lint hits on published pages.
  • Reading:

    • docsTree(payload) gives the published sections and pages, for your /docs routes.
    • docsPage(payload, '/docs/section/slug') gives one page.
    • The public sees only published pages that aren't archived, without review details or the plugin's own fields. Drafts and old versions are for editors (access.edit) only.
  • Bodies are Markdown, so your site renders them its own way.

On its own, and with others

On its own. Docs needs the MongoDB adapter, access.edit and access.review, and at least one feature source: a list function you write. Drafts come from your own generate, or from each feature's summary and details. It doesn't import any other plugin.

Needs. Payload ^3.80.0 as a peer dependency. No other EXTANT APE plugin is required.

Works with:

  • Roadmap (@extantape/payload-plugin-roadmap): with catalog: { docs: true }, Roadmap's features catalog adds itself to config.custom.docsSources and calls onFeatureChange when an entry changes. No import either way, and plugin order doesn't matter.

Color Theory. None needed. It has no screens of its own, and its collections use Payload's standard admin, which takes Color Theory's admin colors when its applyToAdmin option is on.

Family. Docs is in the Library family, with Watchlist and Wikipedia, which are named but not built yet. Roadmap is in a different family (Patronage), so that pairing is "works with". The families are a working draft that may change.

Install

npm install @extantape/payload-plugin-docs
import { docsPlugin, onFeatureChange } from '@extantape/payload-plugin-docs'

docsPlugin({
  sources: [{ name: 'catalog', list: async ({ payload }) => myFeatures(payload) }],
  generate: async ({ feature, uiText }) => myModelCall(feature, uiText), // { summary, body } in Markdown
  access: { edit: isEditor, review: isReviewer }, // both required
  privateTerms: myPrivateTerms,
  allow: ['YouTube', 'Stripe'],
})

// In your feature source's own hook:
await onFeatureChange(payload, { source: 'catalog', feature, req }) // or { source, removedId, req }

Run syncDocs and checkDocs nightly. Another plugin can be a feature source with no import: it adds { name, list } to config.custom.docsSources (in any plugin order) and calls payload.config.custom.docs?.onFeatureChange from its own hook when that's there.

Limits

  • The lint is a pattern check, not an understanding. It catches the common ways internals leak. A person still reviews every page before it's published.
  • Collection names are refused when they look like code (with a hyphen or underscore, mixed case, or in backticks), so ordinary words that happen to be a collection's name don't trip it.
  • MongoDB only for now.

Commands

npm test          # integration tests, in-memory MongoDB
npm run typecheck
npm run build

License

MIT. See LICENSE.

Similar plugins