Skip to content

Rebuild the site and fix maths and code rendering - #249

Merged
djeada merged 3 commits into
masterfrom
site-rebuild-2026-10-28
Oct 28, 2026
Merged

djeada merged 3 commits into
masterfrom
site-rebuild-2026-10-28

Conversation

@djeada

@djeada djeada commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Rebuilds the site from the latest notes with scripts/run_all.py, and fixes the maths and code rendering problems that a full browser check of the generated pages turned up.

Rendering fixes

  • Maths in excerpts and descriptions. Several notes now open with formulas, so the blog and category listing pages showed raw TeX such as $A\in\mathbb R^{m\times n}$ (38 excerpts), and meta descriptions came out as "For A R^m n". A new scripts/tex_text.py turns inline TeX into readable text ("For A ∈ ℝ^(m×n), x ∈ ℝⁿ…"). generate_article_list.py and apply_common_elements.py use it, and excerpts are now HTML-escaped.
  • Python course tasks. In 35 task pages, the chapter rules showed a raw ```python fence, because fenced code inside a list item wasn't handled. In 18 pages, **bold** wrapping `code` stayed as literal asterisks. Both are fixed in generate_course_tasks.py. The two formulas on the course index, which loads no KaTeX, are now written as text.
  • Code blocks. About 20 fence languages that Prism doesn't have (proto, apache, cmd, make, conf, fstab, …) requested grammar files that return 404 and stayed unhighlighted. LANGUAGE_ALIASES now maps them to real grammars (protobuf, apacheconf, batch, makefile, …) or to plaintext.
  • Quantum optics tool. src/tools/quantum_optics/index.html had been empty since Repair website links and images and regenerate source articles #228, so the tool page was blank. It's restored from the commit before Repair website links and images and regenerate source articles #228, with the Redesign the site as modernist and the tools as a restrained grimoire #229/Restyle the site and tools as Technical Editorial #243 redesign changes applied: grimoire.css, the header sigil, and no emoji in headings or buttons.

Upstream notes

Three of the source PRs listed in docs/link-repairs-2026-10-18.md were merged before this rebuild: Databases-Notes #22, Frontend-Notes #33 and Vtk-Examples #36. The VTK geospatial script is a link again instead of a broken image. Kurs-Podstaw-Pythona #11 is still open because it needs an approving review, so this rebuild undoes its one-line link fix in paradygmaty_programowania. Merge it and rebuild to restore it.

Checks

  • Headless Chromium loaded all 988 article and course pages after the rebuild. Results: no MathJax TeX errors or undefined macros across 14,516 formulas, no stray AsciiMath, no JS or console errors, and no failed requests. There's also no leftover markdown (fences, bold, links, headings) and no code-block placeholders.
  • Python tests: python3 -m unittest discover -s tests passes, with new tests for the TeX helper, the course markdown fixes and the Prism aliases.
  • Playwright: the full suite ran once, and the specs that failed in that run (layout stability, site experience, optics, course tasks) passed when rerun serially. The eigenvalues layout-shift failure only happened under parallel load.

Not changed here

  • generate_algo_course.py checks article anchors before generate_table_of_contents.py adds heading ids, so 26 lesson links lose their #section part. #binary-search-trees-bst- is also stale and should be #binary-search-trees-bst.
  • Frontend-Notes notes/08_protocols.md escapes <!DOCTYPE html> inside a code fence, so readers see the entities.

🤖 Generated with Claude Code

djeada and others added 3 commits October 29, 2026 00:12
Listing excerpts and meta descriptions now turn inline TeX into readable
text instead of showing raw $...$ or dropping the commands. The Python
course renders fenced code inside list items and bold around inline
code, and writes the course index formulas as text. Fence languages
Prism does not have map to a grammar that exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page was emptied in #228. Bring it back from the commit before,
with the redesign applied: grimoire.css, the header sigil, and no emoji
in headings, buttons or the help box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated with scripts/run_all.py after merging the open source PRs
for Databases-Notes, Frontend-Notes and Vtk-Examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for goofy-brahmagupta-0a14f0 ready!

Name Link
🔨 Latest commit 2f01c55
🔍 Latest deploy log https://app.netlify.com/projects/goofy-brahmagupta-0a14f0/deploys/6ae2816bb1dfd75681591e15
😎 Deploy Preview https://deploy-preview-249--goofy-brahmagupta-0a14f0.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@djeada
djeada merged commit fa269ac into master Oct 28, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant