Skip to the content
Documentation

[StaticPublishSettings]

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

The group [StaticPublishSettings] of settings/staticcache.ini.

File

settings/staticcache.ini; override it in settings/override/staticcache.ini.append.php, in a siteaccess or in an extension.

Settings

Setting Default Description
Enabled disabled Static publishing: a front siteaccess built as a folder of static files that any static host serves (GitHub Pages, any web server), with its links rewritten and its files copied. Each target is a [Target_<id>] block below; ./console exp:static:targets lists them and exp:static:build builds one. Static publishing as a whole: enabled or disabled. Nothing is built while it is disabled.
TargetList[] (empty array) The targets, by id: the ids of the [Target_<id>] blocks that are built. An id is 1 to 50 lower case letters, digits, _ and -.
WorkDir static-publish Where the builds are kept, relative to the var directory of the site (var/<site>/static-publish) unless absolute. Each target has its own folder below it, never inside the site's own repository.
MaxSiteBytes 1000000000 The most bytes a build may have before the build warns: the size the host allows a site (GitHub Pages: 1 GB). The build warns above 90 %.
MaxFileBytes 100000000 The most bytes one file may have before the build warns: the size the host allows a file (GitHub: 100 MB).
Push enabled Whether exp:static:publish and exp:static:rollback push to the target's Remote: enabled, or disabled to commit and tag in the target's folder only (exp:static:push pushes later). A push is never forced.
CommitName Exponential static publishing The committer of a publish when the target's repository names none.
CommitEmail (empty) Its e-mail address; empty: static-publish@<host name>.
JobHistory 50 How many jobs (builds, publishes, rollbacks started in the administration) keep their files in <WorkDir>/.jobs; older ones are removed. A job that is running is always kept.
GitHubAPI enabled The GitHub integration: GitHub's API for targets with Kind=github-pages (create the repository, switch GitHub Pages on from the branch or from GitHub Actions, the custom domain and HTTPS, the Pages build status). It signs in with the target's Credential (token: or app:). enabled or disabled; publishing to the branch works without it.
GitHubAPIURL https://api.github.com The address of GitHub's REST API (GitHub Enterprise Server: https://<host>/api/v3).
GitHubAppId (empty) A GitHub App for Credential=app:<installation id>: the App's id, and the name of the secret (Setup > Secrets) that holds the private key (PEM) GitHub made for it. The App needs the repository permissions Contents, Pages and Administration (to create repositories), read and write.
GitHubAppKey (empty)  
GitHubOAuthClientId (empty) The client id of an OAuth App with the device flow switched on, for ./console exp:static:github signin: a user signs in on github.com and the token is kept in the secret store for Credential=token:<secret>.
FormEndpoint enabled The form endpoint (staticpublish/form): the information collectors of the targets with Forms=endpoint post to this installation, which hands them to the normal information collection. Only posts from a target's PublicURL or CustomDomain with a token signed by a build are taken. enabled or disabled (the copies show the fallback text instead).
FormTokenDays 400 How long the token a build writes into a form stays valid, in days. A new publish writes new tokens.
FormRateLimit 5 How many posts one address may send to one target in FormRateWindow seconds before it is asked to wait (429).
FormRateWindow 600  
FormFallbackText This form works on the live site only. The text that replaces a form a static copy cannot send (comments, the basket, a collector with Forms=hide), and the text of its link to the same page on the live site.
FormFallbackLink Open this page there  
SearchMaxBytes 2000000 The most bytes of one language's search index (Search=enabled): over it, the index keeps fewer words per page, then no teasers, then fewer pages.
PublishDebounce 120 Publishing on content publish (Triggers[]=publish): the cronjob part staticpublish builds the changed pages of a target this many seconds after the last change, so a series of edits makes one publish.
NotifyEmail (empty) Where the notices of the targets' Notify[] go; empty: site.ini [MailSettings] AdminEmail.
WebhookSecret (empty) The name of a secret (Setup > Secrets) whose value signs every webhook (header X-Exp-Static-Signature: sha256=<HMAC of the body>). Empty: not signed. Only the name is here; never the value.

See also

Generated example: staticcache.ini [StaticPublishSettings]

Added to the reference for Exponential 6.0.15: the 4.x reference had no page for this group. The descriptions are the comment lines of settings/staticcache.ini.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.