|
Some checks failed
Deploy Documentation / build-and-deploy (push) Failing after -8h1m21s
Mainwp.dev.coder |
||
|---|---|---|
| .github/workflows | ||
| _data | ||
| _documentation | ||
| assets/css | ||
| deploy-test | ||
| dox-theme | ||
| guides | ||
| hooks-generator | ||
| mainwp-hooks | ||
| mainwp-hooks-categorized | ||
| mainwp-hooks-old | ||
| memory-bank | ||
| phpdoc | ||
| source-code | ||
| sources | ||
| ~ | ||
| .clinerules | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .readthedocs.yaml | ||
| 404.md | ||
| _config.yml | ||
| composer.json | ||
| composer.lock | ||
| developer-changelog.md | ||
| Gemfile | ||
| generate-docs.sh | ||
| index-static-backup.html | ||
| index.md | ||
| LICENSE | ||
| preview-code-blocks.html | ||
| README.md | ||
| test-code.html | ||
| test-deploy.sh | ||
| test-header.html | ||
| test-navigation-style.css | ||
| test-navigation.html | ||
| test-page-nav.html | ||
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 Dashboardsource-code/child/- Generated API documentation for MainWP Childmainwp-hooks/- Generated hooks documentation (actions and filters)phpdoc/- phpDocumentor configuration fileshooks-generator/- Scripts for generating and categorizing hooks documentationsources/- Source repositories for documentation generation.github/workflows/- GitHub Actions workflows for automation
Setup Instructions
Prerequisites
- PHP 7.4 or higher
- Composer
- Git
Installation
-
Clone this repository:
git clone https://github.com/mainwp/mainwp.dev.git cd mainwp.dev -
Install dependencies:
composer install -
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:
-
Install dependencies in the hooks-generator directory:
cd hooks-generator composer install -
Run the hooks generation script:
./generate-hooks.sh -
To generate categorized hooks documentation:
./generate-categorized-hooks.sh
Automated Documentation Generation
The documentation is automatically generated and deployed using GitHub Actions:
- On a weekly schedule (Sunday at midnight UTC)
- When a new version tag is pushed
- When manually triggered via the GitHub Actions workflow
- 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 Dashboardsource-code/child/- API documentation for MainWP Child- Future directories will include:
rest-api/- REST API documentationmainwp-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.