First, after cloning the website repo, make sure the _coursebook
submodule is updated.
git submodule init
git submodule update --recursive
Make a folder separate from the folder which holds the course repository and copy into that folder Dockerfile
, Gemfile
, and Gemfile.lock
.
Run id -u
in the terminal to get your user id. Then, in the Dockerfile, replace number in the USER
line with that id in the following format
USER <uid>:<uid>
If you are not able to run docker commands without using sudo, add yourself to the docker sudo users group with the following commands:
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
Reboot the terminal with sudo reboot
for the changes to take effect. This will give your uid permissions to run docker.
See the following link for more information on this step: https://docs.docker.com/engine/install/linux-postinstall/
Lookup the ip address of your machine using ip a
. The inet address for either the loopback interface or the ens interface will work.
Build an image from the dockerfile and run it as a contaiiner:
docker build -t course_site .
docker run -v /home/marial5/illinois-cs241.github.io/:/workspace -p 4000:4000 -it course_site
In a web browser go to the ip address listed from the ip a
command and port number 4000 (i.e. localhost/4000). The website will be running there.
- Ruby
- bundler (Ruby's package manager)
- gcc
- make
- hunspell
First make sure you have ruby >= 2.6. We recommend using rvm
rvm use 2.6.0
After, we recommend bundler to install all the dependencies
sudo gem install bundler
Then nagivate to the root of the repostory and install
bundle install
Finally, your repository has the submodules needed
git submodule init
git submodule update --recursive
To build the site it is as simple as
bundle exec rake
If you want to build and serve a simple web server, run
bundle exec rake serve
If you want to run a spell check do
bundle exec rake spell_check
This website is made with Jekyll and Github Pages.
Jekyll is a static site generator that allows us to write markdown instead of html and comes with Liquid Templating which uses a combination of tags, objects, and filters to load dynamic content and has a nice cheat sheet.
Github Pages will host this repo not only as a code base but will also as a webserver for our website.
The magic happens in the integration. Github Pages has Jekyll integration, so if you push any changes to this repo, then Github Pages will automatically have Jekyll generate a new static site and serve it. This means that you can makes changes to the webpage simply by pushing changes to it. No more package installations, no more Angular JS, no more rsync. This also means that you can take advantage of the Github UI and edit files from a web browser.
_data
: stores configurations filesassignments.yaml
: stores the assignments info. Update this to release/hide assignmentschedule.yaml
: stores the lecture schedulestaff.yaml
: stores the staff infohonors_projects.yaml
honors_schedule.yaml
malloc_hof.yaml
Winners for the malloc contestman.json
Autogenerated json file that resolves man page linkstaff-emeritus.yaml
Staff that have contributed greatly to the coursestaff.yaml
Current staff
_includes
: holds html that is used everywherehead.html
: holds code for including other filesheader.html
: top nav bar code
_layouts
: hold layout templatesdoc.html
: layout template for documentation
_docs
: where all the documentation is stored as markdown_sass
: sass files (files named appropriately)css
: holds cssimages
: holds imagesjs
: holds javascriptslib
: folder for librariesstatic
: holds other static content, like PDFs_config.yml
: global site configuration_pages
Keeps stray pages_coursebook
Markdown directory with all the coursebook material
All documentation is stored in assignment-docs
repository. To make any changes, go to that repository.
Once you have created this file you can add all the markdown you please. Somethings to take note of is that javascript will run to make all the areas between h2
/##
tags into sections and add an entry to the table of content. The title of the section and the entry of in the table of content is exactly the text that comes after your h2
/##
. Also h1
/#
is reserved for the title which will automatically be added in.
You might want to add syntax highlighting.
This can be done by fencing with triple backticks: