Merge pull request #3994 from arthurhammer/patch-1

Fix broken configuration documentation page
This commit is contained in:
Jordon Bedwell 2015-09-24 13:41:56 -05:00
commit c91b622967
1 changed files with 12 additions and 12 deletions

View File

@ -355,23 +355,23 @@ In the build (or serve) arguments, you can specify a Jekyll environment and valu
For example, suppose you set this conditional statement in your code: For example, suppose you set this conditional statement in your code:
```liquid {% highlight liquid %}
{% raw %} {% raw %}
{% if jekyll.environment == "production" %} {% if jekyll.environment == "production" %}
{% include disqus.html %} {% include disqus.html %}
{% endif %} {% endif %}
{% endraw %} {% endraw %}
``` {% endhighlight %}
When you build your Jekyll site, the content inside the `if` statement won't be run unless you also specify a `production` environment in the build command, like this: When you build your Jekyll site, the content inside the `if` statement won't be run unless you also specify a `production` environment in the build command, like this:
```bash {% highlight sh %}
JEKYLL_ENV=production jekyll build JEKYLL_ENV=production jekyll build
``` {% endhighlight %}
Specifying an environment value allows you to make certain content available only within specific environments. Specifying an environment value allows you to make certain content available only within specific environments.
The default value for `JEKYLL_ENV` is `development`. Therefore if you omit `JEKYLL_ENV` from the build arguments, the default value will be `JEKYLL_ENV=development`. Any content inside `{% raw %}{% if jekyll.environment == "development" %}{% raw %}` tags will automatically appear in the build. The default value for `JEKYLL_ENV` is `development`. Therefore if you omit `JEKYLL_ENV` from the build arguments, the default value will be `JEKYLL_ENV=development`. Any content inside `{% raw %}{% if jekyll.environment == "development" %}{% endraw %}` tags will automatically appear in the build.
Your environment values can be anything you want (not just `development` or `production`). Some elements you might want to hide in development environments include Disqus comment forms or Google Analytics. Conversely, you might want to expose an "Edit me in GitHub" button in a development environment but not include it in production environments. Your environment values can be anything you want (not just `development` or `production`). Some elements you might want to hide in development environments include Disqus comment forms or Google Analytics. Conversely, you might want to expose an "Edit me in GitHub" button in a development environment but not include it in production environments.