Building a Course Site
What follows are the steps needed to build a course site with
our current course building system.
-
Each course contains a makefile in its main directory.
This uses the
make
utility and a number of rules
to build various targets. We will discuss possible
two targets here:
local and prod.
-
Our static site courses use "ptml" files (pre-html) to include
various common or script-generated components in
target html files. Always edit a ptml file, not an
html file.
(This is a substitute for a server-side include utility
like the one Django has.)
-
After editing the ptml file, run 'make local' to build
the html file. This will run an html-code checker first,
and then run an AWK script that includes other content
than the ptml file in the final product (the html file).
If the code checker reports errors, the build will
stop, and you will have to fix the errors before
the html file will build.
-
Once you get a good build, test your local version of
the html file in a browser (by using
'file:///path-to-your-file') and see if it looks
like you want it to. Check links, make sure images
load, videos play, etc.
-
Once you have verified your work is correct, you
can re-build the online website by running
'make prod'.
-
The final step is to check the online version and
make sure it, too, works as you intended.