Jekyll based template for GW CS.
Setup the repository
ORGNAME.github.io
. This guide assumes that, buthttps://github.com/twood02/webtemplate
) into your new oneYou now can try to preview your site at https://orgname.github.io
, however, you may see that the site's formatting is mostly broken. To fix this we need to adjust some settings specific to your site.
Edit the _config.yml
file either by checking out the repo or through the github web editor
title
, email
, author
, and description
tags. The description
will appear in the footer of each page, so typically I just list the course numberbaseurl
field:baseurl
to /
baseurl
to the path to the site (in this case /~USERNAME
)If you edited the config file directly on github, github pages will automatically rebuild the site and you should now see a proper layout when you visit ORGNAME.github.io
. It may take a few minutes for the website to rebuild.
The site is built using Jekyll (installation instructions below) which supports markdown and HTML formats. I generally use markdown files and add in HTML where necessary to do more complex formatting.
If you have the repository checked out to your computer, you can test the site locally by running: ./run.sh
in the repo root. This will start a webserver at localhost:4000
where you can see the site (the link will be different if you adjusted the baseurl field). As soon as you edit and save a file, the site will automatically rebuild.
If you aren't using GitHub pages to automatically render the site, then you can run JEKYLL_ENV=production bundle exec jekyll build --incremental
to create a local version of the site in build/
which you can upload somewhere directly.
I think all you need to is the following:
brew install ruby
gem install bundler jekyll
bundle install
Check https://jekyllrb.com/ for more details.