{"id":25978460,"url":"https://github.com/troychaplin/multi-block-starter","last_synced_at":"2026-04-07T04:31:27.066Z","repository":{"id":278919979,"uuid":"937146537","full_name":"troychaplin/multi-block-starter","owner":"troychaplin","description":"A WordPress starter plugin that serves as a foundational template for block development, uniquely combining different block types (dynamic, static, and interactive) into a single, efficient plugin structure.","archived":false,"fork":false,"pushed_at":"2025-11-23T00:39:19.000Z","size":2528,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-23T02:25:30.438Z","etag":null,"topics":["gutenberg-block","interactivity-api","wordpress-plugin","wordpress-starter-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/troychaplin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-22T12:56:55.000Z","updated_at":"2025-11-23T00:39:23.000Z","dependencies_parsed_at":"2025-03-30T14:20:39.590Z","dependency_job_id":"9a736ce0-4dc9-4ddb-8dee-e4fed68780ce","html_url":"https://github.com/troychaplin/multi-block-starter","commit_stats":null,"previous_names":["troychaplin/wp-multi-block-starter","troychaplin/multi-block-starter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/troychaplin/multi-block-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troychaplin%2Fmulti-block-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troychaplin%2Fmulti-block-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troychaplin%2Fmulti-block-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troychaplin%2Fmulti-block-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/troychaplin","download_url":"https://codeload.github.com/troychaplin/multi-block-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troychaplin%2Fmulti-block-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31500397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gutenberg-block","interactivity-api","wordpress-plugin","wordpress-starter-plugin"],"created_at":"2025-03-05T05:26:55.553Z","updated_at":"2026-04-07T04:31:27.046Z","avatar_url":"https://github.com/troychaplin.png","language":"PHP","readme":"# Multi Block Starter Plugin\n\nSupercharge your WordPress block development with this modern, production-ready starter plugin. Built for developers who need a robust foundation for creating multiple block types, this plugin combines the power of static, dynamic, and interactive blocks in one efficient setup. Say goodbye to juggling multiple plugins and hello to a streamlined development workflow with optimized asset loading, modern build tools, and best practices baked in.\n\nThis plugin serves as a foundational template for WordPress block development, uniquely combining different block types (dynamic, static, and interactive) into a single, efficient plugin structure.\n\n## Table of Contents\n\n-   [Core Features \u0026 Architecture](#core-features--architecture)\n    -   [Block Architecture](#block-architecture)\n        -   [Unified Block Management](#unified-block-management)\n        -   [Efficient Asset Loading](#efficient-asset-loading)\n    -   [Build System](#build-system)\n        -   [Asset Management](#asset-management)\n    -   [Technical Implementation](#technical-implementation)\n    -   [Development Environment](#development-environment)\n-   [Prerequisites](#prerequisites)\n-   [Getting Setup](#getting-setup)\n-   [Local WordPress Environment](#local-wordpress-environment)\n    -   [Local Site Info](#local-site-info)\n    -   [Troubleshooting](#troubleshooting)\n-   [Development Commands](#development-commands)\n-   [Coding Standards](#coding-standards)\n-   [Project Structure](#project-structure)\n\n## Core Features \u0026 Architecture\n\n### Block Architecture\n\n#### Unified Block Management\n\nThe plugin provides a structured approach to managing multiple block types:\n\n-   Static Blocks: Traditional Gutenberg blocks rendered entirely in JavaScript\n-   Dynamic Blocks: Server-side rendered blocks using PHP for dynamic content\n-   Interactive Blocks: Client-side interactive blocks with JavaScript functionality\n\n#### Efficient Asset Loading\n\nEach block operates as an independent unit, similar to single-block plugins, with:\n\n-   Isolated asset loading - scripts and styles load only when blocks are used\n-   Separate frontend and editor bundles to optimize performance\n-   Smart asset versioning through WordPress's build process (the asset.php files automatically track dependencies and versions based on content changes)\n\n### Build System\n\n#### Asset Management\n\nThe plugin uses WordPress's modern build system with some notable features:\n\n-   Automatic version hashing through `.asset.php` files\n-   The version numbers in `Enqueues.php` are dynamically generated during build, preventing cache issues and ensuring users always get the latest block versions\n-   Dependencies are automatically tracked and included in the build process\n\nThe build process supports loading an additional script into the block editor for:\n\n-   Block variations and modifications\n-   Custom style variations\n-   Custom block categories\n-   Other block related functionality\n\n### Technical Implementation\n\nThe plugin demonstrates modern WordPress development practices:\n\n-   Proper namespacing and class structure\n-   Clean separation of concerns between editor and frontend code\n-   WordPress coding standards compliance\n-   Development tooling for code quality (ESLint, PHP_CodeSniffer, Prettier)\n\n### Development Environment\n\nThe plugin includes a complete development environment with:\n\n-   Docker-based local WordPress setup through `wp-env`\n-   Hot reloading for development\n-   Automated build processes for production\n-   Comprehensive linting and formatting tools\n\nThis structure provides a robust foundation for building complex block-based solutions while maintaining clean code organization and optimal performance.\n\n---\n\n## Prerequisites\n\nBefore you begin, ensure you have the following installed:\n\n-   Node.js (v16 or higher)\n-   Docker (if you intend to use `wp-env`)\n-   Composer\n-   Git\n\n## Getting Setup\n\nThis plugin can be cloned into the plugins folder of an existing local WordPress installation, or cloned to any other location if you intend to use `wp-env` for local development.\n\n```\ngit clone https://github.com/troychaplin/multi-block-starter.git\ncd multi-block-starter\nnpm run setup\n```\n\n## Local WordPress Environment\n\nThis project includes [@wordpress/env](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) as an optional local development environment. You can run the following to start and stop the Docker container:\n\n-   `npm run wp-env start`\n-   `npm run wp-env stop`\n\n### Local Site Info\n\n-   Site: http://localhost:8888\n-   Admin: http://localhost:8888/wp-admin\n-   Login: `admin`\n-   Password: `password`\n\n### Troubleshooting\n\nIf wp-env issues occur try the following:\n\n-   `npm run wp-env stop`\n-   `npm run wp-env clean`\n-   `npm run wp-env start`\n\n## Development Commands\n\n-   `npm start` - Start development mode with hot reloading\n-   `npm run build` - Build production assets\n-   `npm run lint:js` - Lint JavaScript files\n-   `npm run lint:css` - Lint CSS files\n-   `npm run format` - Format code using WordPress standards\n\n## Coding Standards\n\nThis project follows WordPress coding standards using:\n\n-   PHP_CodeSniffer with WordPress Coding Standards\n-   ESLint with WordPress configuration\n-   Prettier for code formatting\n\nRequired VS Code extensions:\n\n-   PHP CodeSniffer\n-   ESLint\n-   Prettier\n\n### Troubleshooting\n\nFor PHP_CodeSniffer issues:\n\n```\ncomposer dump-autoload\n```\n\n## Project Structure\n\n```\nwp-multi-block-starter/\n├── build/                  # Compiled files\n├── src/                    # Source files\n│   └── blocks/             # Block components\n│       └── dynamic/        # Dynamic blocks\n│       └── interactive/    # Interactive blocks\n│       └── static/         # Static blocks\n├── Functions/              # PHP classes\n├── vendor/                 # Composer dependencies\n├── node_modules/           # Node dependencies\n├── .eslintrc.json          # ESLint configuration\n├── .wp-env.json            # WordPress environment config\n├── composer.json           # PHP dependencies\n├── package.json            # Node dependencies\n└── README.md               # This file\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroychaplin%2Fmulti-block-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftroychaplin%2Fmulti-block-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroychaplin%2Fmulti-block-starter/lists"}