Skip to content
Prev Previous commit
Next Next commit
Add instructions for regenerating the reference
  • Loading branch information
kadamwhite committed Mar 30, 2020
commit 20928f69ba3293ffce708ce6aaeef11232a5ffab
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@ This repo contains the source for [documentation for the API](https://developer.
When creating new files, these must be added to the manifest. Run `bin/generate-manifest.php` to update this.

Removing files also requires regenerating the manifest. After deletion and sync with DevHub, the page also needs to be manually deleted from DevHub.

## Refreshing the Templated API Reference

The reference section is created by parsing the output of a site's schema as retrieved from that site's REST API index route. The current method used to generate this approach is as follows:

- Create a local WordPress environment (always use the current or Release Candidate version of WordPress) using the local environment tool of your choice.
- Edit `/etc/hosts` to map the domain `example.com` to the IP of that WordPress instance, and ensure the site is configured to run at `example.com`.
- Run `composer install` in this project's root directory to install dependencies.
- Run `bin/regenerate.php` in this project's root directory to run the asset regeneration script.
- Use `git status` and `git diff` to validate that the files were updated as expected.