In order to conveniently maintain an archive of previous semesters, we recommend that you store all content for a given semester at semester.domain.com
. However, it is convenient for students to be able to access the most current verison of course material at domain.com
. Having a permanent reference to the most current iteration of the site is also useful for many reasons, including placing links in lecture slides or adding notes to previous iterations of the course website to mitigate the odds that current students are accessing outdated material.
To facilitate this, this Github Pages template simply redirects from domain.com/*
to semester.domain.com/*
. If the user navigates to domain.com
, this is accomplished through an HTML redirect. Otherwise, this is done through JavaScript in order to dynamically match the path provided.
- Set up your root domain as a GitHub Pages domain. You can learn how to do this in the configuring an apex domain section of the GitHub pages guide, or in the Course Site Template Deployment Guide.
- Create a new repository from this template.
- Open the Repository, and Navigate to
Settings > Pages
. - Select
Deploy from a branch
, set the branch tomain
/ (root)
, and enter your apex domain into the "Custom Domain" box. Press save. - Proceed to the "Semesterly Setup" section.
- Navigate to
_config.yml
, and updatetarget
to your currentsemester.domain.com
.