This repository contains the Hugo source for KIPR's student-facing Botball
worksheets, Introductory projects, and Botball Explorer materials. Treat Markdown,
YAML, layouts, and static assets as source; do not edit generated public/ or
resources/_gen/ output.
Read the documentation index and the guide relevant to the task before making changes:
- Architecture explains page families, canonical data, rendering paths, and asset ownership.
- Development and verification contains the authoritative build and test commands.
- Content authoring defines front matter, student voice, references, field keys, accessibility, and asset conventions.
- Shortcode reference is the public component API for authored Markdown.
- Migration contracts identifies behavior that must remain compatible with legacy pages and saved student work.
- Make the smallest change that fits an existing page family or shared
component. Search
layouts/_shortcodes/,layouts/_partials/, and the shortcode reference before adding markup or a new renderer. - Do not add raw HTML to content. Use Markdown, block attributes, or an existing shortcode; Goldmark intentionally renders with authored raw HTML disabled.
- Preserve existing
mission_id, fieldkey/data-key, page identity, and persistence values unless the task explicitly changes their compatibility contract. Renaming them can discard students' saved worksheet data. - Keep definitions and repeated facts canonical. Glossary and official rule
text belong in
data/glossary.yaml; Explorer mission metadata belongs in the mission leaf bundle; navigation belongs indata/nav.yaml. - Use lowercase Hugo page references for content and literal URLs only for static targets. Preserve the shared relative-URL path so builds work at a domain root, project mount, and from local files.
- Preserve useful labels, alternative text, keyboard behavior, print meaning, and stable links when changing UI or content.
- Treat
backup/anddata/introductory-legacy-inventory.jsonas reference evidence. Do not casually regenerate baselines or broaden migration exceptions to make a check pass. - Review the existing worktree before editing and leave unrelated changes untouched.
Use the pinned Hugo environment. Build into a fresh directory so stale output cannot hide missing pages or assets:
build_dir="$(mktemp -d)"
hugo --buildDrafts --destination "$build_dir" --printPathWarnings --logLevel errorRun the checks that cover the changed area, following docs/development.md for the full commands. At minimum, a source or template change should receive a fresh Hugo build. JavaScript behavior changes should run the relevant dependency-free Node test.
In the final handoff, report which checks ran and any failures.
The cloud VM does not use the repo Dockerfile/.devcontainer/. Hugo
v0.164.0 extended is installed to /usr/local/bin/hugo by the startup update
script; node is preinstalled. There is no package.json, no npm install
step, and the tools/ and tests/ scripts use only Node built-ins, so the
build, lint, and test commands documented under docs/ run as-is.
Pandoc 3.6.4 and its custom-writer documentation are required for Introductory
HTML imports. Repository Cloud Agent setup runs sh tools/cloud-install.sh
(see .cursor/environment.json). If pandoc is missing in an already-running
VM, run that script once:
sh tools/cloud-install.sh
ls /usr/local/share/doc/pandoc/custom-writers.htmlThe importer is:
node tools/introductory-importer/import.js --helpIt reads html+raw_html through the Lua writer at
tools/introductory-importer/writer.lua and refuses to overwrite existing
Markdown unless --force is passed. Leave tbc/ unchanged; generated
Markdown under content/introductory/ is the authored source after import.
Non-obvious gotchas when serving the dev server here:
- The configured
baseURLincludes the project mount, so a defaulthugo serverserves pages under/wombat-tutorial-interface/. To browse at the localhost root instead, override the base URL:hugo server --buildDrafts --bind 0.0.0.0 --port 1313 --baseURL http://localhost:1313/. Pages are then at e.g.http://localhost:1313/labs/prelab0/(the root path/returns 200; the un-overridden/wombat-tutorial-interface/path returns 404 in this mode). - Worksheet auto-save/restore (
static/js/lab.js) is keyed by pagemission_idand persists every[data-key]control tolocalStorage["kipr_<mission_id>_draft"]. Verify it deterministically in the browser console (readdocument.getElementById(...).valueafter a reload) rather than by eye — small form text is easy to misread in screenshots/video. node tools/check_theme_output.js <build_dir>reports a pre-existing failure on the staticISTE_Standards.htmldownload page; it is not part of the documented verification command set underdocs/.