canvas-page-checks

Capture and check every page of a template end to end before you publish

Check every page with the Canvas

The Canvas in the Template Builder shows every page of a template side by side and checks each one end to end: is it served, does it render, and does it look like a page? Use it before you publish, especially on pattern templates where one template edit changes hundreds of pages.

Before you start

  1. Set your website's domain in Settings β†’ Websites.
  2. Your site must serve its draft preview at /cms-preview_<path> (the Median renderer's ParametricPreview does this).

Open the Canvas

  1. Open a page in the Template Builder.
  2. Click Canvas in the top bar.

Every URL of the template appears as a tile. For a pattern template like /docs/{post} that includes every document's page, even the ones that have no stored page of their own.

How a page is captured

For each page, the CMS fetches its draft preview from your website's own domain (nowhere else), removes every script, and renders the static result in a sandboxed frame that cannot run code. The Canvas then captures it as a tile.

Because scripts are removed, what you see is the page as the server renders it. Content that only appears after JavaScript runs in the browser is not part of the capture.

Read the results

Each tile gets a badge:

  • βœ“ green: the page was served, rendered and captured without problems.
  • βœ— red: something failed. The tile shows the first reason, and the pages failing panel lists every reason per page.

A page fails when:

  • the site answers with a status other than 2xx (for example a 404 or 500),
  • the page is empty,
  • it shows error text such as "An error was thrown" or "Internal Server Error",
  • one or more images did not load (the panel names them),
  • the capture comes out blank,
  • or it takes too long to load and capture.

The toolbar shows how many pages pass, for example 12/14 passing.

Results are remembered

Passing pages are kept in your browser. Next time you open the Canvas, a page whose HTML has not changed shows straight away with its green check instead of being checked again. Change the page, or anything it renders, and it is checked afresh.

To check everything again regardless, click Check every page again (the refresh button in the Canvas toolbar).

Tips

  • Fix failures in the Template Builder, then re-open the Canvas: only the pages that changed are re-checked.
  • Fonts loaded from your site may not appear in the capture if your site does not allow cross-origin font requests. The page is still checked.
  • Use Scale in the toolbar for sharper tiles; each scale keeps its own remembered results.