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

Fix environment setup in new structure #546

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Allow accessing a GitHub bearer token to avoid rate limits when doing HTTP fetches to the GitHub API.
# This can be generated at https://github.com/settings/tokens?type=beta and needs read-only access to all public CYF GitHub repos.
CYF_CURRICULUM_GITHUB_BEARER_TOKEN=""
HUGO_CURRICULUM_GITHUB_BEARER_TOKEN=""
# Client ID and secret for the GitHub OAuth app used to authenticate users.
GITHUB_CLIENT_ID="clientid"
GITHUB_CLIENT_SECRET="clientsecret"
# The domain of the site, used for generating redirect URLs.
DOMAIN="http://localhost:8888"
DOMAIN="http://localhost:8888"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ For each module you import, add a `replace` directive to your `go.mod` file - if

## To locally develop your site

`cd` into the site you wish to develop, and run `hugo server` to get a live preview.
Check [org-cyf/README.md](/org-cyf/README.md) on how to set up your local environment. Once that is done you can `cd` into the site you wish to develop, and run `npm run start:dev` to get a live preview.
2 changes: 1 addition & 1 deletion org-cyf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The "Repository access" you need is "Public repositories (read-only)", and you d

#### Set up `.env`

Copy the `.env.example` file over and name it `.env`. Edit the file and then change the line that says `CYF_CURRICULUM_GITHUB_BEARER_TOKEN` to contain the token that you have generated earlier.
Copy the `.env.example` file over and name it `.env`. Edit the file and then change the line that says `HUGO_CURRICULUM_GITHUB_BEARER_TOKEN` to contain the token that you have generated earlier.

#### Run this command

Expand Down
3 changes: 2 additions & 1 deletion org-cyf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start:dev": "dotenv -- hugo server -p 3000 -D"
"start:dev": "dotenv -e ../.env -- hugo server --environment issues-are-cached-and-incomplete",
"build:dev": "dotenv -e ../.env -- hugo --environment issues-are-cached-and-incomplete"
},
"keywords": [],
"author": "",
Expand Down
4 changes: 2 additions & 2 deletions org-mcb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start:dev": "dotenv -- hugo server --environment issues-are-cached-and-incomplete",
"build:dev": "dotenv -- hugo --environment issues-are-cached-and-incomplete"
"start:dev": "dotenv -e ../.env -- hugo server --environment issues-are-cached-and-incomplete",
"build:dev": "dotenv -e ../.env -- hugo --environment issues-are-cached-and-incomplete"
},
"keywords": [],
"author": "",
Expand Down
Loading