You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chore: Allow to develop locally without a GitHub API key (#365)
Fixes#57. A new environment variable NO_GH_API_KEY was introduced
and is used as flag to show that we don't want to provide GitHub API keys
Co-authored-by: bryan-aguilar <[email protected]>
Co-authored-by: Anthony Mirabella <[email protected]>
Copy file name to clipboardExpand all lines: DEV_GUIDE.md
+23-5Lines changed: 23 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,35 @@
14
14
```
15
15
npm install
16
16
```
17
-
5. [Generate a GitHub Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token)
18
-
6. Create a new file in the root called `.env.development` (See [Project Structure](#project-structure) for more information)
19
-
7. In the `.env.development` file, add the following line:
17
+
5. Disable GitHub API access (Used to fetch the list of contributors)
18
+
Create a new file in the root called `.env.development` (See [Project Structure](#project-structure) for more information)
19
+
Write the following line to it:
20
+
```
21
+
NO_GH_API_KEY=true
22
+
```
23
+
4. Start up the Gatsby site
24
+
```
25
+
npm start
26
+
```
27
+
5. Open http://localhost:8000 to check the site
28
+
29
+
**Obs**: The `NO_GH_API_KEY` environment variable can also be passed through command line. E.g.: `NO_GH_API_KEY=true npm run start`.
30
+
31
+
### Optional - Test the GitHub API integration
32
+
33
+
This step is optional and allows you to test that the list of contributors is being fetched from GitHub.
34
+
35
+
1. [Generate a GitHub Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token)
36
+
2. Create a new file in the root called `.env.development` (See [Project Structure](#project-structure) for more information)
37
+
3. In the `.env.development` file, add the following line:
0 commit comments