Unit 11: math engine — drop MathJax, keep KaTeX (gated, with SRI)#13
Open
stradichenko wants to merge 1 commit intomainfrom
Open
Unit 11: math engine — drop MathJax, keep KaTeX (gated, with SRI)#13stradichenko wants to merge 1 commit intomainfrom
stradichenko wants to merge 1 commit intomainfrom
Conversation
- Delete layouts/partials/math.html (MathJax loader). - Remove the inline math-reprocess script from baseof.html (was the last artifact of the dual KaTeX+MathJax setup). - Add assets/js/katex-init.js: imports KaTeX modules, runs renderMathInElement on DOMContentLoaded, exposes window.reprocessMath for dynamic content. - In head.html (gated on .Params.math or site.Params.math), include KaTeX CSS + JS with SRI integrity. - Document the math: true page param in README.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
layouts/partials/math.html(MathJax loader).baseof.html(last artifact of the dual KaTeX+MathJax setup).assets/js/katex-init.js: imports KaTeX modules, runsrenderMathInElementon DOMContentLoaded, exposeswindow.reprocessMathfor dynamic content.head.html(gated on.Params.mathorsite.Params.math), include KaTeX CSS + JS with SRI integrity.math: truepage param inREADME.md.Notes for reviewer
baseof.html(Unit 5 still referencespartials/math.html) and with Unit 6 onhead.html(KaTeX block).Test plan
math: truepage renders LaTeX via KaTeX.<script>in build output (grep -r "mathjax" exampleSite/publicreturns empty).Part of the PKB-theme modernization batch (15 units).