Repository navigation
v2.3.1
Headline: corrects two defects in what 2.3.0 shipped. Code cells nested inside a directive (
{exercise},{solution},{note}) drew a run button that did nothing; they now register with the kernel and execute. Self-hosted stylesheet assets 404'd inmyst build --htmloutput, so every KaTeX font failed and maths fell back to system glyphs on statically built sites; asset URLs are now relative and resolve in every layout. Source Sans 3 is self-hosted too, removing the last third-party origin from the critical rendering path. Consumers upgrade by bumping the pinned release URL insite.template.
Added
- Visual-fixture coverage for fancy ordered lists inside a directive.
tests/visual/fixture/lists.mdgains aprf:theorem-wrapped stamped list, andlists-markersasserts it renders with the sametype,start,list-lower-roman delimiter-parensclasses and drawn marker as the equivalent body-level list. Every fixture list previously sat in the page body, soLIST_RENDERERSreaching theprf:*subtree was accidental rather than asserted: it works becausemyst-to-react's proof renderer passes its children through the same<MyST/>dispatcher, and because nothing instyles/lists.cssscopes a selector to body-vs-proof. Both are load-bearing and neither was pinned, so a change to either would silently return the ~330 list items across the dp books' 118prf:*blocks to decimal markers — a regression far too small in area for the snapshot diff budget, which is why it is asserted against the DOM (#121).
Changed
- Source Sans 3 is now self-hosted instead of
@imported fromfonts.googleapis.com. Google Fonts is blocked in mainland China, a significant share of the QuantEcon readership, and unlike the CDN stylesheets removed in 2.3.0 this one is the body font on every page rather than the maths on some of them. It also had the worst possible shape for a critical-path request: a CSS@import, discovered only afterapp.csshad downloaded and parsed, so the browser could not preload it and the chain ranapp.css→ Google's CSS →fonts.gstatic.comwoff2 across two extra origins. The font now ships from@fontsource-variable/source-sans-3through the same Remix import route the KaTeX CSS uses, so its 14.woff2files are served from the site's own origin. The family is declared asSource Sans 3 Variable, sotailwind.config.jsand the inlined critical CSS inapp/root.tsxname it that way too, with plainSource Sans 3kept next in the stack for a locally installed copy. Rendered text is unchanged in substance, but the@fontsourcebuild's glyph metrics differ marginally from the Google-served static font, enough to re-wrap a line at the mobile viewport — so the linux mobile-chrome baselines were refreshed (#148); every desktop baseline is untouched (#131).
Fixed
- Code cells nested inside a directive (
{exercise},{solution},{note}, …) are now registered with the kernel, so their run button works and their outputs survive a kernel connection.@myst-theme/jupyter'snotebookFromMdastwalked only the mdast root's direct children, so a cell atroot > block > exercise > block[kind=notebook-code]never enterednotebook.cellsor theidkmap— while the renderer matchesblock[kind=notebook-code]at any depth and drew a run button anyway. Clicking it loggedno cell found on executeand did nothing, with no error visible to the reader; on a live-compute page the cell's pre-baked outputs also blanked as soon as the kernel attached, because the active output renderer could not find a cell to bind to. Fixed by a thirdpatches/entry (@myst-theme+jupyter+1.3.0.patch) that walks nested blocks depth-first and appends them in document order — which is execution order — while skipping{embed}subtrees, whose cells belong to another page's notebook and would otherwise collide in the shared key map. The existingblock > container > codefigure case and the markdown-cell fallback are unchanged. Note that nested cells now participate in Run all, so solution and exercise cells execute along with the rest of the page. (#117) - Self-hosted stylesheet assets no longer 404 in static builds. Remix rewrites every
url()in a bundled stylesheet to an absolute/myst_assets_folder/…path, which resolves undermyst start— the theme's own server mountspublic/buildthere — but not inmyst build --htmloutput, where the assets land underbuild/_assets/and mystmd's rewriter only fixes up.html,.jsand.json, never.css. So the KaTeX stylesheet self-hosted in #125 loaded while all 60 of its font references failed, and maths fell back to system glyphs on every statically built site — the degradation that change set out to prevent. The build now rewrites those references to be relative to the stylesheet, which resolves identically undermyst start, in a static build, and under abaseurl(where the absolute path was also wrong, affecting the per-PR preview deployments). Every rewritten target is checked to exist beside its stylesheet, so a wrong assumption fails the build instead of shipping silent 404s (#138).