When examples need a trigger
Use a manual trigger when the deployed page can stay behind CMS changes after save.
- React
ssg: stale until the preview snapshot is rebuilt - Vue
ssg: stale until the preview snapshot is rebuilt - Next
isr: stale until the route is revalidated - Next
ssg: stale until an external rebuild or deploy runs
The example marketing pages render both HomePage and PricingPage, so create these triggers with Global scope in /settings/triggers and set Availability to Canvas publish.
Example trigger recipes
React SSG preview rebuild
- Method:
POST - URL:
http://localhost:3002/api/rebuild/ssg - Scope:
global
Vue SSG preview rebuild
- Method:
POST - URL:
http://localhost:3004/api/rebuild/ssg - Scope:
global
Next ISR revalidate
- Method:
POST - URL:
http://localhost:3006/api/revalidate/isr - Scope:
global
Next SSG
- Method:
POST - URL:
http://localhost:3006/api/revalidate/ssg - Scope:
global
Canvas usage
- Create the trigger in
/settings/triggersand set Availability to Canvas publish. - Copy the raw trigger id from the trigger row.
- Open the example page with:
?cms0TriggerId=<trigger-id>If the app is running against a different admin origin, also pass a Canvas API key:
?cms0ApiKey=<api-key>&cms0TriggerId=<trigger-id>Replace the default example ports if you started preview servers on different ports.