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 run the same commands that publishing does, which is the default command for your static site generator of choice:
- For Hugo, this is
- 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.
Caught a mistake or want to contribute to the docs? Edit this page on Github!