Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Maintenance Mode

Maintenance mode answers every visitor with the theme’s /maintenance page, or a plain notice, until it is switched off.

use lateritecmf::web::theme::maintenance::MaintenanceSettings;

let settings: MaintenanceSettings = lateritecmf::admin::settings::load(&db).await?;

Settings › Website › Maintenance Mode, under web.manage_site:

FieldMeaning
Show visitors the maintenance pageOn, a visitor gets status 503 with Retry-After: 600.
MessageThe plain notice’s text, when the theme has no page at /maintenance.
Page atServes
/maintenanceEvery visitor’s request while the mode is on.

Keep working while it is on

A user with web.manage_themes sees the site as usual, with a bar at the foot of every page.

Link on the barOpens
View as a visitorThe same path with ?maintenance=visitor: the maintenance page, status 503.
Turn it offThe Maintenance Mode settings screen.
Back to the siteThe path without the query, from the visitor’s view.
<div role="status" data-laterite-maintenance>...</div>

The bar sits before </body>, or at the end of a document without one.