static-spa-conversion
Static SPA Conversion
Schema authority: all
window.COURSEfield names come from_shared/domain-primitives.md. When the schema example below diverges from that file, that file wins.Starter templates (copy these, don't re-derive):
templates/index.html— scaffold shell with render pipeline skeletontemplates/course-data.template.js— empty schema example with TODO markers for every primitive../teaching-site-design-system/templates/tokens.css— paste into<style>block, or copy asstyle.cssnext toindex.htmlReference implementation:
d:/GitHub/ai-workshop/index.html(4125 lines, fully populated). Use as visual + render-pattern reference; do not copy course-specific content from it.Filename convention (English-first):
course-package/,day{n}/outline.md,day{n}/content.md,materials/,overview.md. Legacy Chinese names (完整課程包/,課程大綱.md,教學素材/, etc.) are deprecated — see_shared/domain-primitives.md§0 for full mapping.
This skill turns chapter-based markdown content into a working single-page app. The architectural commitments are deliberate and worth understanding before you start.
The Three Architectural Commitments
- Vanilla HTML + JS, no framework, no bundler. No React, no Vite, no TypeScript build. Why: course websites have multi-year lifespans and are often handed to non-developer instructors. A
.htmlyou can open and edit beats anode_modulesgraveyard every time. Also: the content is the value, not the tech.