Skip to content

Commit

Permalink
Add virtual python & node environment and bump to docusaurus v2
Browse files Browse the repository at this point in the history
  • Loading branch information
nating committed Dec 2, 2022
1 parent c7f931a commit 74bf1cc
Show file tree
Hide file tree
Showing 44 changed files with 4,269 additions and 6,708 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
output/

.idea
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '12'
- '16.16.0'
branches:
only:
- master
Expand Down
31 changes: 31 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

set -e

echo "Building python environment"
if [[ ! -d "output/py" ]]; then
python3.9 -m venv output/py
. output/py/bin/activate
pip install --upgrade pip setuptools >> output/pip.out 2>&1
pip install -r requirements.txt >> output/pip.out 2>&1
else
. output/py/bin/activate
fi

echo "Building node environment"
if [[ ! -d "output/node" ]]; then
nodeenv --node=16.16.0 --with-npm --npm=9.1.3 output/node
npm install
. output/node/bin/activate
else
. output/node/bin/activate
fi

cd website

echo "Building static website"
yarn install
yarn run build

echo "Serving website"
yarn run serve
38 changes: 38 additions & 0 deletions package-lock.json

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

13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "cs-exams",
"description": "",
"version": "1.0.0",
"repository": {
"type": "git",
"url": "https://github.com/nating/cs-exams.git"
},
"license": "MIT",
"devDependencies": {
"yarn": "1.22.19"
}
}
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeenv==1.7.0
36 changes: 22 additions & 14 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
# Website

This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

## Installation
### Installation

```console
yarn install
```
$ yarn
```

## Local Development
### Local Development

```console
yarn start
```
$ yarn start
```

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
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
### Build

```console
yarn build
```
$ yarn build
```

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

## Deployment
### Deployment

```console
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ 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.
2 changes: 1 addition & 1 deletion website/docs/advanced-telecommunications.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Also known as Advanced Computer Networks (CSU33032)

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/artificial-intelligence.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CSU33061

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/compiler-design-i.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CSU33071

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/computational-mathematics.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CSU33081

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/computer-architecture-ii.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CSU34021

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/computer-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CSU22014

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/computer-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ XSCH3087

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/concurrent-systems-i.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CSU33014

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/digital-logic-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CSU11026

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/discrete-maths.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ MAU22C00

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/electrotechnology.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CS1025

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/fuzzy-logic-and-control-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CS4001

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/human-factors.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CS4051

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/information-management-i.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CSU22041

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/information-management-ii.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CSU34041

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/introduction-to-computing.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ CSU11021 & CSU11022

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/introduction-to-functional-programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CSU34016

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/introduction-to-programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CS1010

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/mathematics.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CSU11001 & CSU11002

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/maths.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ XSCH3071

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/microprocessor-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CSU23021

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ XSCH3307

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/security-and-privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ CS7NS5 || CSU44032 || CS7053 || CS7453 || CS7NS5 || CS4407

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/statistical-methods-for-computer-science.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ST3009

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/symbolic-programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CSU34011

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/systems-programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CSU22014

## Questions by Topic

<table className="examQuestions" width="700px">
<table className="examQuestions">
<tbody><tr>
<td><strong>Topic</strong></td>
<td><strong>Questions</strong></td>
Expand Down
Loading

0 comments on commit 74bf1cc

Please sign in to comment.