A powerful tool to generate beautiful documentation for WordPress plugin hooks.
- 📦 Automatically collects action and filter hooks from your WordPress plugin
- 📝 Generates well-structured markdown documentation
- 🌐 Creates a beautiful documentation site using Docusaurus
- 🎨 Fully customizable theme
- 🔍 Built-in search functionality
- Node.js >= 20.0
- PHP >= 8.3
npm install -g @10up/wp-hooks-documentor- Initialize a new configuration file:
wp-hooks-documentor init- 
Edit the generated wp-hooks-doc.jsonfile to match your project settings.
- 
Generate documentation: 
wp-hooks-documentor generateThe tool uses a single configuration file (wp-hooks-doc.json) to control all aspects of the documentation generation process. Here's a complete example with all available options:
{
  "title": "Plugin Hooks Documentation",
  "tagline": "Hooks Documentation for the plugin",
  "url": "https://example.com",
  "baseUrl": "/",
  "repoUrl": "https://github.com/username/repo",
  "organizationName": "username",
  "projectName": "repo",
  "input": ".",
  "ignoreFiles": [
    "/tests/",
    "/vendor/",
    "/node_modules/"
  ],
  "ignoreHooks": [],
  "outputDir": "./wp-hooks-docs",
  "templatesDir": "./.wp-hooks-docs/template",
  "footerStyle": "dark",
  "footerCopyright": "Copyright © 2025. Built with WP Hooks Documentor."
}- title: Site title
- tagline: Site tagline
- url: Production URL
- baseUrl: Base URL path
- repoUrl: GitHub repository URL
- organizationName: GitHub organization/username
- projectName: GitHub repository name
- input: Path to your WordPress plugin
- ignoreFiles: Files to ignore
- ignoreHooks: Hooks to ignore
- outputDir: Where to export documentation site
- templatesDir: Custom templates directory to customize overall documentation site.
- footerStyle: Footer style, eg: dark or light
- footerCopyright: Footer copyright text
- wp-hooks-documentor init: Create a new configuration file
- wp-hooks-documentor generate: Generate complete documentation
The documentation site uses Docusaurus, which means you can fully customize the theme. See the Docusaurus documentation for more details.
Beta: This project is quite new and we're not sure what our ongoing support level for this will be. Bug reports, feature requests, questions, and pull requests are welcome. If you like this project please let us know, but be cautious using this in a Production environment!
A complete listing of all notable changes to Repo Automator - GitHub Action are documented in CHANGELOG.md.
Please read CODE_OF_CONDUCT.md for details on our code of conduct, CONTRIBUTING.md for details on the process for submitting pull requests to us, and CREDITS.md for a list of maintainers, contributors, and libraries used in this repository.
