Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env variable guide explanation #954

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ Currently uses the Gatsby Remark check links plugin to runs the following basic
> - For changes to general content, site pages, images, etc. See the [content folder](/content/).
> - For changes to the logic, or looking adding new features to the devportal. Refer to `gatsby-config.ts`, `gatsby-node.ts`, `/src` pages.

## Add new env variable

To add a new environtment variable you have to create the variable in the `.env.*` file adding `GATSBY_*` prefix. This is needed for [Vercel](https://vercel.com/) which the cloud provider for the devportal.
Then it will be available under for instance `process.env.GATSBY_API_URL` in your code.
```
process.env.GATSBY_API_URL;
```

### Writing original documentation

Steps:
Expand Down