Skip to content

Commit a2d1ff1

Browse files
committed
docs: reorganize sections for more logical flow
1 parent 3b027eb commit a2d1ff1

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed

README.md

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ Out of the box, this template provides a minimal WordPress theme with basic supp
2222

2323
## Table of Contents
2424

25-
| Developer Documentation |
26-
| --------------------------------------------------- |
27-
| [Quickstart](#quickstart) |
28-
| [Customization](#customization) |
29-
| [Local Development Setup](#local-development-setup) |
30-
| [WordPress](#wordpress) |
31-
| [Project Structure](#project-structure) |
32-
| [Generators](#generators) |
33-
| [Plugins](#plugins) |
34-
| [Custom Blocks](#custom-blocks) |
35-
| [Deployment](#deployment) |
36-
| [How to Contribute](./CONTRIBUTING.md) |
37-
| [Code of Conduct](./CODE_OF_CONDUCT.md) |
25+
| Developer Documentation |
26+
| --------------------------------------------------------- |
27+
| [Quickstart](#quickstart) |
28+
| [Customization](#customization) |
29+
| [Local Development Setup](#local-development-setup) |
30+
| [WordPress](#wordpress) |
31+
| [Project Structure](#project-structure) |
32+
| [Plugins](#plugins) |
33+
| [Generators](#generators) |
34+
| [Implementing Custom Blocks](#implementing-custom-blocks) |
35+
| [Deployment](#deployment) |
36+
| [How to Contribute](./CONTRIBUTING.md) |
37+
| [Code of Conduct](./CODE_OF_CONDUCT.md) |
3838

3939
## Quickstart
4040

@@ -351,6 +351,42 @@ The `php/` directory holds the PHP template files for the WordPress theme. Other
351351
- `partials` - Twig templates for components or pieces of the page to be reused should go here.
352352
- `shortcodes` - Twig templates for shortcodes should go here.
353353

354+
## Plugins
355+
356+
### Installing Plugins
357+
358+
Install plugins via `composer` by running `npm run php:run composer require wpackagist-plugin/<plugin-name>:<version-number-or-range>`. For example:
359+
360+
```sh
361+
# install a specific version/range for advanced-custom-fields
362+
npm run php:run composer require wpackagist-plugin/advanced-custom-fields:^6.1
363+
364+
# or just install the latest version, letting composer resolve the range
365+
npm run php:run composer require wpackagist-plugin/advanced-custom-fields
366+
```
367+
368+
Running this command will update `composer.json` and `composer.lock`, but you will need to rebuild (`docker compose build`) and restart your container (`npm start` or `npm run serve:dev`) to see the new plugin reflected in the WordPress admin.
369+
370+
### Updating Plugins
371+
372+
You can run `composer require` as above to update existing plugins, or you can do the following.
373+
374+
1. Update the version number in the "require" list in `composer.json`.
375+
1. Run `npm run php:run composer update` to update `composer.lock`.
376+
377+
Again, you'll need to rebuild and restart your container to see the changes reflected in WordPress.
378+
379+
### Recommended Plugins
380+
381+
This is a non-comprehensive list of plugins that we have found useful on other projects.
382+
383+
- [Metabox][metabox]
384+
- [Advanced Custom Fields][advanced-custom-fields]
385+
- [Yoast SEO][yoast-seo]
386+
- [Google Site Kit][google-site-kit]
387+
- [Contact Form 7][contact-form-7]
388+
- [Rollbar][rollbar]
389+
354390
## Generators
355391

356392
We have a handful of generators to make it easier to add new custom post types, taxonomies, shortcodes, and page templates. If none of the generators give you what you need, you can try using https://generatewp.com/ to get more relevant code snippets.
@@ -474,45 +510,9 @@ The following files will be created based on your input:
474510

475511
See [custom block structure](#custom-block-structure) for more info on what these files are for.
476512

477-
## Plugins
478-
479-
### Installing Plugins
480-
481-
Install plugins via `composer` by running `npm run php:run composer require wpackagist-plugin/<plugin-name>:<version-number-or-range>`. For example:
482-
483-
```sh
484-
# install a specific version/range for advanced-custom-fields
485-
npm run php:run composer require wpackagist-plugin/advanced-custom-fields:^6.1
486-
487-
# or just install the latest version, letting composer resolve the range
488-
npm run php:run composer require wpackagist-plugin/advanced-custom-fields
489-
```
490-
491-
Running this command will update `composer.json` and `composer.lock`, but you will need to rebuild (`docker compose build`) and restart your container (`npm start` or `npm run serve:dev`) to see the new plugin reflected in the WordPress admin.
492-
493-
### Updating Plugins
494-
495-
You can run `composer require` as above to update existing plugins, or you can do the following.
496-
497-
1. Update the version number in the "require" list in `composer.json`.
498-
1. Run `npm run php:run composer update` to update `composer.lock`.
499-
500-
Again, you'll need to rebuild and restart your container to see the changes reflected in WordPress.
501-
502-
### Recommended Plugins
503-
504-
This is a non-comprehensive list of plugins that we have found useful on other projects.
505-
506-
- [Metabox][metabox]
507-
- [Advanced Custom Fields][advanced-custom-fields]
508-
- [Yoast SEO][yoast-seo]
509-
- [Google Site Kit][google-site-kit]
510-
- [Contact Form 7][contact-form-7]
511-
- [Rollbar][rollbar]
512-
513-
## Custom Blocks
513+
## Implementing Custom Blocks
514514

515-
We have two [generators](#generators) that can be used in tandem to create the necessary scaffolding for custom blocks. The first is `npm run generate:custom-blocks-plugin`, which should be run first to create the plugin config, readme, directory, and `package.json`/`docker-compose.yml` changes necessary to make the plugin available to WordPress. The second is `npm run generate:custom-block`, which creates the boilerplate files necessary to create a single custom block within the plugin.
515+
To implement custom blocks, begin by using the two [generators](#generators) in tandem to create the necessary scaffolding for custom blocks. The first is `npm run generate:custom-blocks-plugin`, which should be run first to create the plugin config, readme, directory, and `package.json`/`docker-compose.yml` changes necessary to make the plugin available to WordPress. The second is `npm run generate:custom-block`, which creates the boilerplate files necessary to create a single custom block within the plugin.
516516

517517
Note: you will need to restart your development process to pick up the changes after adding a custom blocks plugin and/or a custom block.
518518

0 commit comments

Comments
 (0)