Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@siakaramalegos
Last active May 26, 2021 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siakaramalegos/ad2ef00cf9eb53cdeb651cd9f751b89c to your computer and use it in GitHub Desktop.
Save siakaramalegos/ad2ef00cf9eb53cdeb651cd9f751b89c to your computer and use it in GitHub Desktop.
dotenv method of managing secrets
Install the dotenv package: 

$ npm install dotenv


Create a `.env` file in the root of your project, and add your Webmention.io API key

```bash
WEBMENTION_IO_TOKEN=y0urKeyHeRe

Don't forget to add it to your .gitignore file. While we are here, let's add the _cache/ folder which will be created when we first fetch webmentions:

_cache/
_site/
node_modules/
.env

How I added dotenv support to Netlify is covered in this Stack Overflow answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment