This page explains the basics of how courses
is used. It covers installation, creating a new project, serving the project locally, and building the project.
For now, you have to compile Courses yourself. However, it only requires a few steps and should work without any tweaks on most setups.
courses
by opening a terminal (or command promt/powershell) and run the command cargo install courses
.Courses is a single cli
program which provides facilities for creating new projects, serving projects locally, and building projects for distribution. Get an overview of the interface, by running courses -h
. You should see something similar to the following:
Usage: courses [OPTIONS] <COMMAND> Commands: serve build test publish help Print this message or the help of the given subcommand(s) Options: -p, --path <PATH> -h, --help Print help information -V, --version Print version information
To create a new project, use the command courses init <NAME>
where NAME
is the name of a new folder the project will be created in. The tool will ask you whether you want to start from a minimal setup (no default theme and templates) or a batteries-included setup similar to this documentation page. The latter is much better if you want to get up and running quickly.
Courses includes a dev-server (bsed on Penguin
) and automatically rebuilds files when changes are detected. Simply run courses serve
in the project directory to start.
When you want to build the static site for deployment, run courses build
to build the project with the release
configuration. The output is placed in the build/
folder and is ready for use. Read more about configurations here
.