Skip to content

Commit

Permalink
Update the trac update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle authored Oct 4, 2023
1 parent 505ccdd commit 426010a
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions mu-plugins/blocks/global-header-footer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ See `r18316-dotorg` for an example.

Use the API endpoints to get the markup and styles. See `register_routes()` for the endpoints. Examples:

* Trac: [`templates/update-headers.php`](https://github.com/dd32/wordpress.org/blob/c019f1ceb345310c472136d951f82d97fd517cda/trac.wordpress.org/templates/update-headers.php) in Meta SVN.
* Codex: `grab-wporg-header-footer.sh` runs on a cron and updates `header.inc`, then `skins/codex/Codex.php` includes them. See `r14081-deploy`. Codex has heavy page caching, only systems can clear the page cache.
* Planet: `planet/bin/generate-index-template.sh` in `dotorg`.
**Trac**

Make sure to update these files if any markup has changed!

- Check out the folder locally (it wasn't on my sandbox)
```
svn co https://meta.svn.wordpress.org/sites/trunk/trac.wordpress.org/templates
```
- Run `php templates/update-headers.php`. This script will use the header & footer rest API endpoints to parse out the markup, and sync it into the local trac template files ([source](https://github.com/wordpress/wordpress.org/blob/trunk/trac.wordpress.org/templates/update-headers.php)).
- Check the changes & commit the updated templates.
- No deploy needed, the templates are cached based on page hits, so they'll expire eventually.

**Codex**

`grab-wporg-header-footer.sh` runs on a cron and updates `header.inc`, then `skins/codex/Codex.php` includes them. See `r14081-deploy`. Codex has heavy page caching, only systems can clear the page cache.

**Planet**

`planet/bin/generate-index-template.sh` in `dotorg`.

0 comments on commit 426010a

Please sign in to comment.