Skip to content
Use environment variables in Jekyll site
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
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
README.md
jekyll-environment-variables.gemspec

README.md

Jekyll Environment Variables

Buile Status Gem Version

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 }}
You can’t perform that action at this time.