Skip to content

Latest commit

 

History

History
92 lines (54 loc) · 5.82 KB

CONTRIBUTING.md

File metadata and controls

92 lines (54 loc) · 5.82 KB

Contributing Guidelines

Welcome to Create Block Theme! All are welcome here.

How can I contribute?

We welcome contributions in all forms, including code, design, documentation, and triage.

Discussions

Contributors can be found in the #core-editor and #outreach channels in Make WordPress Slack.

There is also a GitHub project board which is used to plan and track the progress of the plugin.

Development Setup

The basic setup for development is:

  • Node/NPM Development Tools
  • WordPress Development Site
  • Code Editor

Prerequisites

We recommend following the Gutenberg code contribution guide for more details on setting up a development environment.

Code Setup

Fork the Create Block Theme repository, clone it to your computer and add the WordPress repository as upstream

git clone https://github.com/YOUR_GITHUB_USERNAME/create-block-theme.git
cd create-block-theme
git remote add upstream https://github.com/WordPress/create-block-theme.git

Run the following commands to install the plugin dependencies:

npm install
composer install

Run npm run build to build the plugin.

There are several linter commands available to help ensure the plugin follows the WordPress coding standards:

  • CSS: npm run lint:css & npm run lint:css:fix
  • JS: npm run lint:js & npm run lint:js:fix
  • PHP: npm run lint:php & npm run lint:php:fix

To test a WordPress plugin, you need to have WordPress itself installed. If you already have a WordPress environment setup, use the above Create Block Theme build as a standard WordPress plugin by putting the create-block-theme directory in your wp-content/plugins/ directory.

Repository Management

Members of the Block Themers GitHub team have write access to the repository. The team is made up of contributors who have:

  • Demonstrated a commitment to improving how block themes are built in the editor
  • Made 2-3 meaningful contributions to the plugin (similar to the Gutenberg team requirements)

If you meet this criteria and would like to be added to the Block Themers team, feel free to ask in the #core-editor Slack channel.

If you are not a member of the team, you can still contribute by forking the repository and submitting a pull request.

Releasing a new version of Create Block Theme

We have an automated process for the release of new versions of Create Block Theme to the public.

1 - Initiate the Release Process

To begin the release process, execute the Create new release PR workflow from the Actions tab. Choose the type of release — major, minor, or patch — from the "Run workflow" dropdown menu. This action triggers the creation of a new Release PR, such as #592, which includes an automated version bump and proposed changes to the Change Log.

2 - Update the Release PR

Keep the Release PR current by incorporating any new changes from the trunk that are intended for this release. Use the git cherry-pick [commit-hash] command to add specific commits to the Release Branch associated with the Release PR. The Release Branch is named using the format: release/[creation-date]/[release-type]-release, where [creation-date] is the date the Release PR was created, and [release-type] is the type selected during the workflow initiation.

3 - Finalize the Release

Once the release is deemed complete and ready, it must be reviewed and approved by members of the organization. Following approval, the Release PR is merged into the main branch. This action triggers the Deploy to Dotorg workflow, which tags the release on both GitHub and the WordPress Plugin Directory SVN. A Release Confirmation is then triggered on WordPress.org, notifying plugin maintainers via email of the new release awaiting confirmation. Upon confirmation, the new version becomes live on the WordPress Plugin Directory.

Guidelines

  • As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our Code of Conduct.

  • Contributors should follow WordPress' coding standards and accessibility coding standards.

  • You maintain copyright over any contribution you make. By submitting a pull request you agree to release that code under the plugin's License.