Skip to content
Use environment variables in Jekyll site
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Initial commit May 9, 2018
.travis.yml Initial commit May 9, 2018
Gemfile Initial commit May 9, 2018

Jekyll Environment Variables

Buile Status Gem Version


Install the gem:

gem install jekyll-environment-variables

And then add it to your _config.yml:

plugins:  # "gems" before Jekyll 3.5
  - jekyll-environment-variables

Alternatively, you can use Bundler with Gemfile:

group :jekyll_plugins do
  gem 'jekyll-environment-variables'

Then run bundle install and let Bundler handle it for you.


All environment variables will be copied to site.env for use in Liquid templates.

Hostname: {{ site.env.HOSTNAME }}
My home: {{ site.env.HOME }}
You can’t perform that action at this time.