Cloudflare Pages

Cloudflare Pages serves a site from Cloudflare's network, for free. Unlike GitHub Pages it needs no repository, and it applies the security headers and cache rules SeedPage writes for the site. It needs a Cloudflare account: make one at cloudflare.com if you have none.

As with GitHub Pages, the site must be kept on Google Drive or on GitHub, not only on this computer.

The first time: a token

SeedPage publishes with a token you make in your Cloudflare account, which can only publish sites on Cloudflare Pages. Choose Cloudflare Pages in the Publish panel and Publish now, and the panel guides you:

Connect SeedPage to Cloudflare: the steps to make a token, the Cloudflare token field, a choice between two Cloudflare accounts, and Connect

Number

Part

What it does

1

Cloudflare's token page

Opens Cloudflare's list of API tokens. Sign in there, choose Create Token, then Create Custom Token, and name it SeedPage.

2

The permission

Under Permissions choose Account, Cloudflare Pages, Edit. Leave everything else as it is and create the token.

3

Cloudflare token

Paste the token Cloudflare shows. Cloudflare shows it only once: copy it before leaving the page.

4

The account

Shown only when the token reaches more than one Cloudflare account: choose the one for your sites.

5

Connect

SeedPage checks the token with Cloudflare, keeps it on this computer, and publishes.

The token is never shown again or sent anywhere but Cloudflare. Forget the Cloudflare token, in the Publish panel and in the Publishing group of Settings, removes it from this computer; delete it on Cloudflare's token page too if you no longer need it.

What it makes

The steps of a first publish on Cloudflare Pages: creating the project, writing the pages.dev address, building, checking which files Cloudflare has, sending 12 of 214 files, and Cloudflare publishing

Number

Part

What it does

1

The project

A Cloudflare Pages project named after the site: clear-accounts, or clear-accounts-2 when that name is taken. Made once; later publishes use it again.

2

The address

Written in the site's settings: clear-accounts.pages.dev.

3

Checking

Cloudflare keeps the files it already has, so SeedPage asks which ones it lacks.

4

Sending

Only the new and changed files are sent, which makes publishing again quick.

If the project was deleted on Cloudflare, the next publish makes it again under the same name, and says so.

The free plan's limits

SeedPage checks them before sending anything:

  • At most 20,000 files, and no file bigger than 25 MiB. Past either, nothing is sent and the panel says which.
  • At most 100 rules of headers, each line at most 2,000 characters. Past them, the site is still published and the panel warns.

A site made of pages and photos stays far below these.

A domain of your own

SeedPage does not yet connect a domain of your own to a Cloudflare Pages project: each publish writes the pages.dev address in the site's settings. A site that needs its own domain today is published on GitHub Pages.

When something goes wrong

  • "Cloudflare does not recognize this token": copy it again from Cloudflare and paste it whole.
  • "This token cannot publish on Cloudflare Pages": the token lacks the permission Account, Cloudflare Pages, Edit. Make another with it.
  • "Cloudflare no longer accepts the token kept on this computer": it was deleted or changed on Cloudflare. Paste a new one; the publish then goes on.
  • "Cloudflare refused the publish": often for a moment. Try again in a few minutes.

Every message is listed in Errors.