Technical documentation for GrowthDoc — a self-hosted, Notion-style document & knowledge-base editor for WordPress with a block/slash-command editor, nested docs and topics. Covers how it works, the shortcode, the document post type, roles & capabilities, REST API, and the AI / MCP abilities.
Version: 1.0.0 | Requires: WordPress 6.0+, PHP 8.0+ | Text domain: growthdoc
1. Overview
GrowthDoc adds a rich document editor (TipTap-based, with “/” slash commands) on top of a hierarchical growthdoc post type. Documents can be nested into a tree, tagged with Topics, and edited in a React single-page app. Content is exposed through the growthdoc/v1 REST API and the WordPress Abilities API (optionally over MCP), so docs can be created and updated by assistants too.
2. Installation & setup
- Activate the plugin. It registers the
growthdocpost type and thegrowthdoc_topictaxonomy, and grants capabilities to Administrator, Editor and Author roles. - Create a page with the shortcode
[growthdoc], or set that page as the app page in Settings for a full-screen takeover. - Optionally change the document URL base (default
documents) in Settings.
3. Shortcode
[growthdoc]Mounts the editor SPA at #growthdoc-root. Requires login and either the access_growthdoc or edit_growthdocs capability; otherwise a permission notice is shown. When a page is configured as the app page, GrowthDoc also enqueues early and redirects logged-out visitors to the login screen.
Editor features include headings, lists, to-dos, quotes, code blocks, tables, inline formatting, internal doc links, topic mentions, and export to Markdown / print to PDF.
4. Document post type & topics
- Post type
growthdoc(label “Documents”) — hierarchical, REST-enabled, supports title, editor, author, revisions, page attributes, excerpt and custom fields. URL base is configurable (default/documents/). - Taxonomy
growthdoc_topic(“Topics”) — groups documents by subject.
Custom post meta: _growthdoc_tiptap (editor JSON, not exposed in REST), _growthdoc_icon, and _growthdoc_cover_url.
5. Roles & capabilities
GrowthDoc uses a mapped capability set (via map_meta_cap). Key capabilities:
| Capability | Grants | Default roles |
|---|---|---|
access_growthdoc | Open the GrowthDoc app | Administrator, Editor, Author |
edit_growthdocs | Create and edit documents | Administrator, Editor, Author |
delete_growthdocs | Delete documents | Administrator, Editor |
The full mapped set (edit_others_growthdocs, publish_growthdocs, read_private_growthdocs, delete_others_growthdocs, etc.) is granted to Administrator and Editor; Authors get edit/publish on their own docs but not delete-others.
6. REST API
Namespace: growthdoc/v1 — base URL /wp-json/growthdoc/v1. Standard WordPress auth (logged-in cookie + X-WP-Nonce). The SPA reads its REST root, nonce and capability flags from the localized GROWTHDOC object. The controller powers listing the document tree, reading/writing document content (TipTap JSON), managing topics, and moving/reordering docs — the same operations available as abilities below.
7. AI abilities & MCP
GrowthDoc registers document and topic tools on the WordPress Abilities API:
| Ability | Purpose |
|---|---|
growthdoc/list-docs | List documents |
growthdoc/get-doc | Read a document |
growthdoc/get-tree | Get the nested document tree |
growthdoc/create-doc | Create a document |
growthdoc/update-doc | Update a document |
growthdoc/append-doc | Append content to a document |
growthdoc/move-doc | Move a document in the tree |
growthdoc/reorder-docs | Reorder sibling documents |
growthdoc/delete-doc | Delete a document (destructive) |
growthdoc/list-topics | List topics |
growthdoc/create-topic | Create a topic |
Each ability declares typed JSON schemas and is capability-gated (edit_growthdocs / delete_growthdocs). Abilities marked MCP-public are exposed as callable MCP tools via the WordPress Abilities MCP adapter; delete-doc is excluded by default. Capability and MCP visibility are configurable per ability or category in the plugin’s Abilities settings.
Back to GrowthDoc product page | All docs