The plugin provides a documentation custom post type for creating and managing documentation.
- Gutenberg editor support
- Markdown processing
- Project taxonomy for organization
- REST API access
- Archive and single views
- In WordPress admin, go to Documentation > Add New
- Write your documentation content
- Assign to appropriate project taxonomy terms
- Publish
Organize documentation with the project hierarchical taxonomy.
- wordpress-plugins
- wordpress-themes
- discord-bots
- php-libraries
Assign taxonomy terms to documentation posts for categorization and filtering.
For exact request/response shapes and permissions, see the API Reference.
All endpoints use the docsync/v1 namespace.
GET /wp-json/docsync/v1/docs- List documentation postsPOST /wp-json/docsync/v1/docs- Create new documentationGET /wp-json/docsync/v1/docs/{id}- Get specific documentationPUT /wp-json/docsync/v1/docs/{id}- Update documentationDELETE /wp-json/docsync/v1/docs/{id}- Delete documentation
GET /wp-json/docsync/v1/project- List project taxonomy termsGET /wp-json/docsync/v1/project/tree- Get hierarchical project treePOST /wp-json/docsync/v1/project/resolve- Resolve or create taxonomy pathGET /wp-json/docsync/v1/project/{id}- Get specific taxonomy termPUT /wp-json/docsync/v1/project/{id}- Update taxonomy term
POST /wp-json/docsync/v1/sync/setup- Setup project + category termsGET /wp-json/docsync/v1/sync/status- Get sync status for a projectPOST /wp-json/docsync/v1/sync/doc- Sync a single documentPOST /wp-json/docsync/v1/sync/batch- Batch sync documentsPOST /wp-json/docsync/v1/sync/all- Manually sync GitHub docs for all projectsPOST /wp-json/docsync/v1/sync/term/{id}- Manually sync GitHub docs for a termGET /wp-json/docsync/v1/sync/test-token- GitHub token diagnosticsPOST /wp-json/docsync/v1/sync/test-repo- GitHub repo diagnostics (repo_url)
See API Reference for complete parameter documentation.
per_page- Number of results per page (default: 10)page- Page number for paginationproject- Filter by project taxonomy term slugstatus- Filter by post status (publish, draft, etc.)search- Search term for title/content
Documentation content supports Markdown syntax via Parsedown.
- Headers (# ## ###)
- Lists (- * numbered)
- Code blocks (```)
- Links and images
- Bold and italic text
- MarkdownProcessor: Converts Markdown to HTML with internal link resolution
- SyncManager: Handles external documentation synchronization and taxonomy management
- RepositoryFields: Manages GitHub/WordPress.org repository metadata and install tracking
- Project Setup: Use
/sync/setupto create project taxonomy terms and categories - Document Sync: Use
/sync/docor/sync/batchto import documentation with proper taxonomy assignment - Content Processing: Markdown content is converted to HTML with internal link resolution
- Taxonomy Management: Automatic creation of hierarchical taxonomy terms as needed
- Metadata Updates: Repository information and install counts are automatically fetched and updated
project_term_id: ID of the project taxonomy term (required)subpath: Hierarchical path within the project as array (e.g., ["api", "endpoints"])source_file: Original source file path for reference (required)title: Documentation title (required)content: Markdown content (required)filesize: Size of source file in bytes (required)timestamp: ISO 8601 timestamp of last modification (required)excerpt: Brief descriptionforce: Override existing content (boolean, default: false)
The plugin tracks install counts for project terms that have a WordPress.org URL configured (returned as meta.installs on GET /project/{id}).
The plugin provides custom templates for documentation display:
- Archive template for documentation lists
- Single template for individual docs
- Codebase card components
- Related posts functionality
This plugin uses standard WordPress hooks internally. Public hooks/filters are not currently documented here; rely on the codebase when extending.
- Api/Controllers/DocsController.php - REST API handling
- Fields/ - Metadata management
- Sync/ - Synchronization logic
- Templates/ - Display components
Sync fails with "Project term not found"
- Ensure you've called
/sync/setupfirst to create the project taxonomy terms - Verify the
project_term_idmatches the ID returned from setup - Check that the project term exists in the project taxonomy
Content not updating
- Set
force: truein your sync request to override existing content - Verify the
timestampparameter is newer than the existing document's timestamp - Check if the document hash has actually changed
Invalid subpath errors
- Ensure
subpathis an array of strings, not a single string - Avoid special characters in subpath segments
- Keep subpath hierarchies shallow (max 3-4 levels)
API authentication errors
- Ensure you're using proper WordPress authentication (cookies or application passwords)
- Verify user has appropriate permissions (
edit_postsfor/sync/docand/sync/batch;manage_optionsfor manual GitHub sync and diagnostics) - Check that the REST API is enabled on your WordPress installation
Enable WordPress debug logging to troubleshoot issues:
// Add to wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);Check /wp-content/debug.log for detailed error information and API request logs.
Monitor sync operations:
# Get sync status for a project
curl /wp-json/docsync/v1/sync/status?project=my-plugin
# List recent documentation
curl /wp-json/docsync/v1/docs?project=my-plugin&per_page=10