Open navClose nav

Previews

Previews allow content editors to see changes in Forestry before saving or publishing those changes, as well as share the drafted changes before publishing them. You can think of Forestry’s previews as your site’s staging environment.

How Previews Work

Previews are generated when an editor clicks the preview button in the top right corner of the editor. Any unsaved changes on the page being previewed will be included in the preview.

While the preview is generating, editors will be presented with a loading screen, and will be redirected to the page being previewed when the preview has finished generating.

Previews will usually take a few seconds to generate. However, depending on the size and complexity of the site, the preview may take anywhere from 15-30+ seconds to generate.

Previews run the same commands that publishing does, which is the default command for your static site generator of choice:

  • For Hugo, this is $ hugo
  • For Jekyll this is $ jekyll build.

If your local development environment uses external build tools like Gulp to generate assets such as CSS, JS, or images, ensure the compiled assets are committed to version control and available to Hugo or Jekyll’s built-in build commands.

How long do previews last?

Previews are guaranteed to persist for up to 24 hours, but may persist longer.

All changes that have not been saved or published will be discarded each time a new preview is generated, or when a preview expires.

Previews immediately expire when your site is published.


Last updated on December 31, 2017