Home
Support Forums

How to Use Environment Variables in Jekyll

If I have an environment variable defined within the dashboard how am I able to use it within my source code using Jekyll?

You can use a package like jekyll-dotenv. Be aware that if you use an environment variable in code that gets processed during build, it might just end up in your production site. If you want to use secret keys and such, try using Netlify Functions instead.