jekyll-environment-variables

jekyll-environment-variables

Use environment variables in Jekyll site

Jekyll Environment Variables

Installation

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'
end

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

Usage

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

Hostname: {{ site.env.HOSTNAME }}
My home: {{ site.env.HOME }}
jekyll logo

Want a Jekyll website built?

Hire a Jekyll developer