Open navClose nav

Environments

There are three unique developer environments when working with a Jekyll site in Forestry:

  • Local environment this is your local development environment on your own machine. See Local Development for more info.

  • Staging environment this is the environment Forestry creates when we generate a preview for you. See Previews for more info.

  • Production environment this is the environment Forestry publishes your site to. See Hosting Options for more info.

In order to make development easier, Forestry sets the environment variable JEKYLL_ENV based on the environment you’re in.

This allows you to set up conditional code in your layouts in order to handle paths, content, or functionality dependent on a specific environment.

This variable is accessible in your templates as {{ jekyll.environment }}.

The values are:

Local environment: "development"
Staging environment: "staging"
Production environment: "production"

Further Reading


Last updated on July 24, 2013