MainWP.dev is a dedicated platform for developers working with MainWP, offering documentation, code snippets, and technical resources to extend and customize MainWP.
Find a file
2025-03-30 11:45:26 -04:00
.github/workflows Add manual copy step for JS vendor files as workaround 2025-03-27 14:56:53 -04:00
_data Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
_documentation Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
deploy-test Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
dox-theme Fix: Improve header dropdown hover behavior and ensure background visibility 2025-03-30 11:45:26 -04:00
guides Add front matter and sidebar navigation structure to actions-filters guide 2025-03-27 16:04:27 -04:00
hooks-generator fixing document links 2025-03-18 14:04:05 -04:00
mainwp-hooks fixing document links 2025-03-18 14:04:05 -04:00
mainwp-hooks-old Initial Developer Docs 2025-03-18 16:29:31 -04:00
phpdoc Adding Pronamic WordPress Documentor for Hooks 2025-03-17 19:02:54 -04:00
source-code Adding Pronamic WordPress Documentor for Hooks 2025-03-17 19:02:54 -04:00
~ Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
.clinerules Remove remaining submodule configurations 2025-03-26 18:08:39 -04:00
.gitattributes Comprehensive fix for Git submodule issues in workflow 2025-03-26 18:18:31 -04:00
.gitignore Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
404.md Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
_config.yml Fix JS 404s: Manually copy vendor JS to _site in workflow 2025-03-27 13:50:03 -04:00
composer.json Initial run of PHPDocumentor 2025-03-17 13:49:10 -04:00
composer.lock Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
developer-changelog.md Update changelog 2025-03-22 00:51:52 +07:00
Gemfile Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
generate-docs.sh Initial run of PHPDocumentor 2025-03-17 13:49:10 -04:00
index-static-backup.html Rename index.html to resolve Jekyll build conflict with index.md 2025-03-27 12:54:55 -04:00
index.md Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
LICENSE Initial commit 2025-03-13 10:33:08 -04:00
preview-code-blocks.html Code snippets layout: Updated line number styling and alignment, added preview page 2025-03-26 12:57:35 -04:00
README.md Adding Pronamic WordPress Documentor for Hooks 2025-03-17 19:02:54 -04:00
test-code.html Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
test-deploy.sh Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
test-header.html Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00
test-navigation-style.css Navigation header update: Added 300ms delay to dropdown menus for improved usability 2025-03-26 13:31:35 -04:00
test-navigation.html Navigation header update: Added 300ms delay to dropdown menus for improved usability 2025-03-26 13:31:35 -04:00
test-page-nav.html Sidebar Navigation: Added collapsible sections, scroll spy, and mobile optimization 2025-03-26 14:06:49 -04:00

MainWP.dev

MainWP.dev is a dedicated platform for developers working with MainWP, offering documentation, code snippets, and technical resources to extend and customize MainWP.

Project Structure

  • source-code/dashboard/ - Generated API documentation for MainWP Dashboard
  • source-code/child/ - Generated API documentation for MainWP Child
  • mainwp-hooks/ - Generated hooks documentation (actions and filters)
  • phpdoc/ - phpDocumentor configuration files
  • hooks-generator/ - Scripts for generating and categorizing hooks documentation
  • sources/ - Source repositories for documentation generation
  • .github/workflows/ - GitHub Actions workflows for automation

Setup Instructions

Prerequisites

  • PHP 7.4 or higher
  • Composer
  • Git

Installation

  1. Clone this repository:

    git clone https://github.com/mainwp/mainwp.dev.git
    cd mainwp.dev
    
  2. Install dependencies:

    composer install
    
  3. Clone the MainWP repositories into the sources directory:

    git clone https://github.com/mainwp/mainwp-dashboard.git sources/mainwp-dashboard
    git clone https://github.com/mainwp/mainwp-child.git sources/mainwp-child
    

Generating Documentation

API Documentation

To generate API documentation for the MainWP Dashboard:

vendor/bin/phpdoc -c phpdoc/dashboard.xml

To generate API documentation for the MainWP Child:

vendor/bin/phpdoc -c phpdoc/child.xml

Or use the provided script to generate both:

./generate-docs.sh

Hooks Documentation

To generate hooks documentation:

  1. Install dependencies in the hooks-generator directory:

    cd hooks-generator
    composer install
    
  2. Run the hooks generation script:

    ./generate-hooks.sh
    
  3. To generate categorized hooks documentation:

    ./generate-categorized-hooks.sh
    

Automated Documentation Generation

The documentation is automatically generated and deployed using GitHub Actions:

  1. On a weekly schedule (Sunday at midnight UTC)
  2. When a new version tag is pushed
  3. When manually triggered via the GitHub Actions workflow
  4. When changes are detected in the source repositories (via webhook)

Directory Structure

The documentation is organized as follows:

  • source-code/dashboard/ - API documentation for MainWP Dashboard
  • source-code/child/ - API documentation for MainWP Child
  • Future directories will include:
    • rest-api/ - REST API documentation
    • mainwp-hooks/ - Documentation for MainWP hooks (actions & filters)
    • guides/ - Developer guides and tutorials

Contributing

Contributions to improve the documentation are welcome. Please submit pull requests to the appropriate repository.