Created
January 18, 2017 09:02
-
-
Save ganesshkumar/17aac22ed4a755fcae89e38a5b642e90 to your computer and use it in GitHub Desktop.
Jekyll plugin to load environmental variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
class EnvironmentVariablesGenerator < Generator | |
def generate(site) | |
site.config['title'] = ENV['TITLE'] | |
site.config['description'] = ENV['DESCRIPTION'] | |
site.config['twitter'] = ENV['TWITTER_USERNAME'] | |
site.config['github'] = ENV['GITHUB_USERNAME'] | |
site.config['linkedin'] = ENV['LINKEDIN_PUBLIC_ID'] | |
site.config['google_analytics'] = ENV['GOOGLE_ANALYTICS'] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment