Skip to content
Open
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: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# .env.example
ALGOLIA_APP_ID=
ALGOLIA_API_KEY=
ALGOLIA_INDEX_NAME=
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# Misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
Expand Down
64 changes: 47 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,71 @@
# Website
# CCSS Handbook

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
The Carleton Computer Science Society internal handbook for volunteers and developers.

### Installation
## Installation

```bash
npm install
```
$ yarn

## Local Development

1. **Create ``.env`` file at the project root**

```bash
echo > .env
```

### Local Development
2. **Add environment variables to the ``.env`` file**

Open the ``.env`` file and define the variables from ``.env.example``. Reach out to Matthew for the values:

```text
ALGOLIA_APP_ID=
ALGOLIA_API_KEY=
ALGOLIA_INDEX_NAME=
```
$ yarn start

3. **Run Start Command**

```bash
npm run start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build
### Formatting

To format the codebase to match the style defined by Prettier:

```bash
npm run format
```
$ yarn build

### Build

```bash
npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
This creates an optimized static `build` in the build directory.

### Deployment
## Deployment

Using SSH:
**Using SSH:**

```
$ USE_SSH=true yarn deploy
```bash
USE_SSH=true npm run deploy
```

Not using SSH:
**Not using SSH:**

```bash
GIT_USER=<Your GitHub username> npm run deploy
```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
This will build the site and push it to the ``gh-pages`` branch.

## Contributing

We welcome new developers! Make sure you are properly [onboarded](https://handbook.carletoncomputersciencesociety.ca/docs/guides/onboarding/development-volunteers) to be able to contribute to this project.
1 change: 1 addition & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import 'dotenv/config';

// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)

Expand Down
25 changes: 25 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"@docusaurus/module-type-aliases": "3.7.0",
"@docusaurus/tsconfig": "3.7.0",
"@docusaurus/types": "3.7.0",
"@types/dotenv": "^6.1.1",
"dotenv": "^16.5.0",
"gh-pages": "^6.3.0",
"typescript": "~5.6.2"
},
Expand Down