stack-site-builder 1.25.0 → 1.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,6 +11,23 @@ content schema, while a consuming site supplies only content, taxonomy data and
11
11
  config. Sites track the theme with `pnpm up stack-site-builder`, so each release
12
12
  here is a plain version bump they pull in.
13
13
 
14
+ ## [1.25.1] - 2026-08-31
15
+
16
+ ### Fixed
17
+
18
+ - **Math in a slide deck rendered twice** — a deck is the one route that does
19
+ not go through `BaseLayout`; `DeckView.astro` renders the whole `<html>`
20
+ itself, so it never picked up the layout's `katex.min.css` import. Without
21
+ that stylesheet the MathML copy rehype-katex emits for screen readers loses
22
+ the rule that clips it out of view, and every formula showed up twice: once
23
+ as unstyled MathML source and once as the real KaTeX drawing beside it. The
24
+ deck now imports the stylesheet too, and `sample-layouts` gained a Math
25
+ section so the deck path is covered the way the article path already was.
26
+ - **Inline math in a slide was oversized** — the `font-size: 1.1em` that trims
27
+ KaTeX's 1.21em default was scoped to `.prose`, which a slide is not. It now
28
+ applies under `.aas-slide-inner` as well, so a formula mid-sentence matches
29
+ the text around it on a slide the same as in an article.
30
+
14
31
  ## [1.25.0] - 2026-08-31
15
32
 
16
33
  Papers and courses routinely carry formulas, and until now a site's only
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stack-site-builder",
3
3
  "type": "module",
4
- "version": "1.25.0",
4
+ "version": "1.25.1",
5
5
  "license": "MIT",
6
6
  "description": "The engine behind the awesome-*-stack catalog sites: an Astro theme with the catalog/concepts/articles/slides/samples routes, components, styles and markdown pipeline. Sites provide content, taxonomy data and config.",
7
7
  "repository": {
@@ -1,5 +1,11 @@
1
1
  ---
2
2
  import '../styles/global.css';
3
+ // A deck is its own document root (this component renders the whole <html>), so
4
+ // it does not inherit BaseLayout's stylesheet imports and needs KaTeX's own
5
+ // stylesheet here as well. Without it the MathML copy that rehype-katex emits
6
+ // for screen readers loses the rule that hides it and renders as a second,
7
+ // unstyled formula beside the real one.
8
+ import 'katex/dist/katex.min.css';
3
9
  import { getRelativeLocaleUrl } from 'astro:i18n';
4
10
  import { render, type CollectionEntry } from 'astro:content';
5
11
  import MermaidLoader from './MermaidLoader.astro';
@@ -1,12 +1,15 @@
1
1
  ---
2
2
  import '../styles/global.css';
3
- // KaTeX's stylesheet, loaded site-wide rather than per-page. An Astro `import`
3
+ // KaTeX's stylesheet, loaded for every page under this layout rather than
4
+ // per-page. An Astro `import`
4
5
  // is resolved statically, so a runtime `{hasMath && …}` guard (the trick that
5
6
  // keeps the Mermaid loader off pages without diagrams) would not actually keep
6
7
  // it out of the bundle. Site-wide is also the cheaper end of the trade: it
7
8
  // merges into the one global stylesheet every page already downloads and
8
9
  // caches, ~7 kB gzipped, and the font files are only fetched by a browser that
9
- // has math to draw. See markdown.mjs for the pipeline that produces the markup.
10
+ // has math to draw. DeckView.astro is the one route that bypasses this layout
11
+ // (a deck renders its own <html>), so it repeats the import.
12
+ // See markdown.mjs for the pipeline that produces the markup.
10
13
  import 'katex/dist/katex.min.css';
11
14
  import { site } from '@aas-data/site';
12
15
  import { getRelativeLocaleUrl } from 'astro:i18n';
@@ -883,8 +883,10 @@ summary {
883
883
  }
884
884
  /* Inline math sits in running text, so it must not introduce its own scrollbar
885
885
  or stretch the line box; KaTeX's 1.21em default is a touch large next to our
886
- body size. */
887
- .prose .katex {
886
+ body size. A slide is not `.prose` — it carries its own type scale — but the
887
+ same mismatch shows up there, so both roots get the rule. */
888
+ .prose .katex,
889
+ .aas-slide-inner .katex {
888
890
  font-size: 1.1em;
889
891
  }
890
892
  /* KaTeX's fonts carry no Hangul, kana or Han glyphs, so for `\text{처리량}` it