New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jekyll-dotenv

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jekyll-dotenv

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

jekyll-dotenv

A very simple Jekyll plugin to read environment variables and .env files into themes.

Installation

Add this line to your site's Gemfile:

gem 'jekyll-dotenv'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-dotenv

Usage

Read Dotenv's documentation

Add the plugin to your _config.yml:

plugins:
- jekyll-dotenv

Export a variable:

export SOME_KEY=ITS_VALUE

Or put it on an .env file:

SOME_KEY=ITS_VALUE

Use in a theme:

{{ site.env.SOME_KEY }}

Advanced

You can create hashes from environment variables like this:

WEBMASTER_VERIFICATIONS.GOOGLE="something"
WEBMASTER_VERIFICATIONS.FACEBOOK="something"

They will be available in Liquid as site.env.WEBMASTER_VERIFICATIONS.GOOGLE and as site.webmaster_verifications.google, which makes jekyll-seo-tag get its configuration from the environment.

Attention

Be aware that your environment variables may contain personal information like username, PATH, etc. so, for instance, site.env may not be fit to be dumped whole as JSON.

Contributing

Bug reports and pull requests are welcome on 0xacab.org at https://0xacab.org/sutty/jekyll/jekyll-dotenv. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Sutty code of conduct.

If you like our plugins, please consider donating!

License

The gem is available as free software under the terms of the GPL3 License.

Code of Conduct

Everyone interacting in the jekyll-dotenv project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

FAQs

Package last updated on 06 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc