=== Static Publication ===
Contributors: basicus
Tags: static site, publishing, cloudflare pages, deployment
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.1.10
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Keeps a Cloudflare Pages site aligned with published WordPress content using PHP inside WordPress.

== Description ==

Static Publication starts with every published public WordPress object, adds sitemap routes and same-origin links, generates the live sitemap from the finalized route inventory, then sends the pages and their referenced assets directly to Cloudflare Pages. It does not require a build service, command-line tool, repository, or editorial workflow plugin.

Public WordPress changes schedule the newest complete site state without delaying the save action. Pending work remains in WordPress when the origin or Cloudflare is unavailable. A revision is complete only after its generation is visible at the configured live URL.

The plugin responds to published posts and pages, public terms, navigation, Customizer publication, and theme changes.

== Installation ==

1. Install and activate Static Publication.
2. Open Settings > Static Publication.
3. Enter the Cloudflare account ID, zone ID, Pages project, live URL, production branch, WordPress sitemap URL, search visibility, and an API token.
4. Save the settings.
5. Select Publish site now for the initial publication.

== Frequently Asked Questions ==

= Does it require an editorial workflow plugin? =

No. It uses native WordPress publication events.

= Does it require a separate build service? =

No. WordPress performs the build and Cloudflare Pages upload in PHP.

= Does Cloudflare delay the WordPress save action? =

No. The requested site state remains pending in WordPress until delivery completes.

= Which Cloudflare credential is supported? =

Use an API token with Cloudflare Pages Edit and Cache Purge permissions for the configured account and zone. Legacy Global API Keys are not supported.

= How is the API token stored? =

The token is encrypted with key material from the WordPress installation.

= How can I publish the complete site without editing content? =

Open Settings > Static Publication and select Publish site now.

== Changelog ==

= 1.1.10 =

* Purges the production hostname cache after a successful Pages deployment and before live verification.
* Requires the Cloudflare zone ID and records cache purge completion in the terminal receipt.

= 1.1.9 =

* Rebuilds the generated sitemap when upload-time projection changes the public route inventory.
* Removes optional linked routes that disappear while their exact upload bytes are reconciled.

= 1.1.8 =

* Continues differential upload after source-byte reconciliation without restarting admission.

= 1.1.7 =

* Normalizes required-route status errors at the WordPress exception boundary.

= 1.1.6 =

* Omits broken discovered links without weakening required WordPress and sitemap routes.

= 1.1.5 =

* Bounds WP-CLI publication work to recoverable slices covered by the dispatch lease.

= 1.1.4 =

* Keeps the internal WordPress not-found fetch route out of public discovery and static output.

= 1.1.3 =

* Normalizes provider status values before retry state is recorded.

= 1.1.2 =

* Keeps complete inventory queries compatible with WordPress query filters and normalizes provider error codes.

= 1.1.1 =

* Includes every published public WordPress object even when it is absent from the sitemap and navigation.
* Includes additional public routes reached through same-origin links.
* Generates the live sitemap from the complete static route inventory.
* Publishes the WordPress not-found surface as the top-level Cloudflare Pages 404 document.

= 1.1.0 =

* Builds the sitemap-backed site in PHP inside WordPress.
* Uploads assets and creates deployments directly through Cloudflare Pages.
* Verifies the matching generation at the live URL.
* Removes the separate delivery service and transport secret.

= 1.0.0 =

* Added durable native WordPress publication tracking.
