This repository generates the course website and holds all lecture materials. It is hosted at https://github.com/ubc-stat/stat-406 and published to https://ubc-stat.github.io/stat-406/.
For course infrastructure setup and management (Canvas, Slack, clickers, R package, homeworks/labs/exams, etc.), see the README in [https://github.com/UBC-STAT/stat-406-instructors/](the STAT 406 instructors repo).
The entire site and all materials are Quarto (.qmd) files.
_quarto.yml— top-level site configuration (navbar, footer, render list, theme).index.qmd,syllabus.qmd,faq.qmd— landing page and standalone pages.schedule/index.qmd— the schedule: module outlines, learning objectives, and the date-by-date table linking to every slide deck and lecture note.schedule/slides/— the intro material, as Quarto reveal.js slides (00-intro.qmd,00-r-review.qmd,00-version-control.qmd). Slide-specific config lives in_metadata.yml(reveal.js format),_config.R,_titleslide.qmd,themer.scss, andtachyons-minimal.css.schedule/lectures/— the rest of the lectures, as Quarto notes (lecture_01_*.qmd…lecture_20_*.qmd), rendered to HTML. Format config is in that folder's_metadata.yml.schedule/Rcode/— standaloneRcode for the lectures.schedule/notebooks/— Jupyter notebooks that generate lecture figures intoschedule/figures/. Not rendered as part of the site; run manually to regenerate plots.schedule/handouts/— supplementary handouts (programming, RMarkdown, git lab).computing/— platform-specific setup instructions (mac_arm.qmd,mac_x86.qmd,ubuntu.qmd,windows.qmd).assets/— shared styles (styles.scss,index.css) and images._freeze/— cached results of executedRchunks (see below). Checked in.
Some notes:
_quarto.ymlcontains the configuration for the site.schedule/slides/_metadata.ymlcontains configuration for the slides;schedule/lectures/_metadata.ymlfor the lecture notes.- Installing the course package should install all necessary packages to render the site. But some may be missing.
The site is configured following https://quarto.org/docs/publishing/github-pages.html#publish-action. Deployment is automatic:
- Push to
mainon GitHub. TheQuarto PublishGitHub Action (.github/workflows/publish.yml) renders the site and pushes the compiled output to thegh-pagesbranch, which is what gets served. - All
Rcode must be run before pushing. The site usesexecute: freeze: auto, so the Action does not runR— it reuses the cached chunk output in_freeze/. This avoids needing anrenvsetup in the Action. Commit any changes to the_freeze/files whenever you edit code in a.qmd, or the published site won't reflect your changes.
If the website doesn't update after a push:
- Check whether the build Action failed (repo → Actions tab).
- If it failed, run
quarto renderlocally and look for the errors there. - If it renders successfully locally, commit any updated
_freeze/files and push again to re-trigger the build.