This is the public website Github repository for 601.220 Intermediate Programming, Summer 2023, at Johns Hopkins University.
The actual website (generated from the contents of this repository) is https://jhu-ip.github.io/cs220-summer24/.
Instructions tested on ubuntu 20.04
This information is for CS220 staff who will be editing and updating the website.
The website uses Jekyll, which in turn is the engine for Github pages.
All of the webpages are written in Markdown.
The best way to install Jekyll is to first install rbenv. I (DH) generally use the Basic GitHub Checkout approach to installing rbenv. Don't forget to init rbenv with
rbenv init
Once rbenv is installed, install ruby-build,
which will allow you to compile a Ruby runtime from source. To install ruby-build in Ubuntu 20.04 I (JAB) used the option Clone as rbenv plugin using git
explained inthe ruby-build
README.
Once ruby-build is installed, install Ruby 3.2.0 using the commands. Ruby version 2.7.0 did not work to install Jekyll.
rbenv install 3.2.0
rbenv global 3.2.0
At this point the command ruby --version
should produce output similar to
ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
Now check if rbenv was correctly initilized. You can check this with the command which gem
which should point to your local .rbenv
<HOME>/.rbenv/shims/gem
At this point you can install Jekyll using the command
gem install jekyll
As you make changes to the website, you can preview the site by running the command
jekyll serve --baseurl ''
Enter the url http://localhost:4000/
in a web browser, and you should be
previewing the website. As you make changes to the website files, the
web browser will not automatically update to reflect those changes, so
you'll need to refresh manually.
Once you're ready to publish your changes, git add
and git commit
them,
and then git push
. Within a few minutes, the site should be rebuilt
remotely to reflect your changes.
To add information to the Course Materials page, edit material.csv, and then run the command
./gen_materials_page.rb > material.md
Hopefully, the format of material.csv
is self-explanatory. It may be convenient
to open this file in a spreadsheet, and then save it as CSV.
Add and commit your changes to both material.csv
and material.md
. (Previewing
the changes first is probably a good idea.)
The file semester.csv is a "full semester" schedule of
course material. In general, when adding one week of course material,
it should be possible to just copy it from semester.csv
.
In previous semesters, we used Yarn and Docusaurus to build the course website. Because the previous websites used admonitions, which are a nonstandard Markdown extension, the Markdown files will need to be converted to standard syntax.
You can use the convert_docusaurus_markdown.rb script to convert the admonition blocks to HTML. (This will require that you have pandoc installed.)
Run this script something like the following:
./convert_docusaurus_markdown.rb < ORIG.md > RESULT.md
where ORIG.md
is the file you want to convert, and RESULT.md
is the updated file to generate.
Note that you will probably need to fix links to image files and other documents, since the new website uses a different directory structure.