Project Core Build Rules Cheat Sheet
Sidebar
AI · Project Core Build Rules Cheat Sheet
The rules every generated page follows: banner, styling, storage, code blocks, PDFs and git. From rules/permanent_rules.md (P1, P2, P4, P6, P11, P12) and CLAUDE.md. All paths are relative to content/ unless stated.
Banner comment (P1)
Course:The course name in normal case.Chapter:A snappy 1-3 word title. The site uses it as the page's real title when there is no genuine <h1>.File: / Topic:The actual filename, and one short descriptive phrase.Date Created / Date UpdatedISO YYYY-MM-DD, one line, last before the closing divider. Created never changes; Updated is bumped on a real edit.older filesA single-line COURSE NAME - Chapter N banner is fine; retrofitting is on request.Styling (shared stylesheets)
course.css / course-lessonTech and programming courses.language.css / language-lessonBasic Conversation and grammar courses.kana.css / kana-lessonScript courses: hiragana, katakana, alphabets.history.css / military.css / scifi.cssWrappers history-lesson, military-lesson, scifi-lesson.per-course sheet/styles/courses/<course-slug>.css, linked after the genre sheet.wrapper<div class="<genre>-lesson <course-slug>"> around the content.new course in a genrepy scripts/python/new_course_style.py <sibling> <new> [--recolor #old=#new]neverA <style> block inside a course chapter.Visible chapter header
.course-nameThe course name, bold but secondary (about 1.3rem)..chapter-subSmall breadcrumb, e.g. Course 1 · Chapter 1 · <name>.no doublingDo not print the chapter name as a second large heading: it is already the page title.no Chapter: fieldLanguage lessons, Python lessons and Sidebar lessons need a real <h1> or <h2> in the body instead.Storage (P2)
<subject>/<course>/Chapter .html files sit directly in the course folder, no html/ subfolder.pdfs/ and solutions/PDFs and .txt exercise solutions, inside the course folder.namesFolder names are lowercase-hyphenated, e.g. web-servers/nginx-in-depth/.sidebar/<subject>/Links, My Tools, Sidebar lessons and cheat sheets.never under content/Temporary files such as *_print.html: the site publishes every .html it finds.not under content/PDF-builder scripts (scripts/python/), shared styles (styles/), progress reports, project source (projects/).Code blocks (P12)
.code-blockEvery code block uses the site's container with highlight spans .cm .kw .st .vr .fn. Never a bare <pre>.indentationCorrect for the language, not re-wrapped.copy buttonWrap in .code-block-wrap with a .copy-btn calling copyCodeBlock(this).no scriptDo not embed copyCodeBlock in a fragment: it lives once in the site layout.directory treesASCII with ├──, └──, │ in a block that really keeps whitespace. Check the rendered page.cheat sheetsNo copy button: short inline <code> only.Course PDF (P4, P6)
commandpy scripts/python/build_course_pdf.py <folder> [--accent "#hex"] [--symbol "🇩🇪"] [--label "..."] [--blurb "..."] [--title "..."]output<folder>/pdfs/<Title>_Course.pdf; the course and chapter names come from the chapters' banners.coverDark background, large title in the accent colour, author line, tagline, no page number.contents pageStraight after the cover; lists every chapter with its real start page. Numbering starts here.interiorDark by default, matching the HTML. Light only if requested.Other PDF builders
build_language_lesson_pdf.py <file>Single language lesson or Basic Conversation chapter.build_python_lesson_pdf.py <file> "<Title>"Python lesson or its exercises.build_sidebar_lesson_pdf.py <Subject> <file> "<Title>"Sidebar lesson.build_cheat_sheet_pdf.py <Subject> <file> "<Title>"Cheat sheet.wrapper filesBuilders write them to the temp folder and delete them.Git and the machine
pyRun Python with py; plain python is a Store stub on this machine.branch mainRemote origin is the private GitHub repository.git-ignored*.pdf, *.zip, *_print.html.before git add -ACheck git status first.site rebuildNeeded after changing a stylesheet in styles/; the build copies it to the site.Snapshot
Snapshot of the rule files as at 2026-11-08, summarised by reading them. Nothing was run to test it. If this sheet and a rule file ever disagree, the rule file wins, and the sheet needs regenerating.