stack-site-builder 1.25.0 → 1.25.2
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 +29 -0
- package/package.json +1 -1
- package/src/components/DeckView.astro +6 -0
- package/src/layouts/BaseLayout.astro +5 -2
- package/src/styles/global.css +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,35 @@ 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.2] - 2026-08-31
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **A display formula on a slide rendered at half the size of the text beside
|
|
19
|
+
it.** Inline math inherits the paragraph it sits in and so already scaled
|
|
20
|
+
with slide prose, but a display block is a direct child of
|
|
21
|
+
`.aas-slide-inner`, whose own font-size is the 1rem root rather than the
|
|
22
|
+
`clamp()` that slide paragraphs get — so a centred equation came out around
|
|
23
|
+
17px next to 26px copy, reading as a footnote to the slide instead of the
|
|
24
|
+
point of it. It now takes the same scale as `p`.
|
|
25
|
+
|
|
26
|
+
## [1.25.1] - 2026-08-31
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- **Math in a slide deck rendered twice** — a deck is the one route that does
|
|
31
|
+
not go through `BaseLayout`; `DeckView.astro` renders the whole `<html>`
|
|
32
|
+
itself, so it never picked up the layout's `katex.min.css` import. Without
|
|
33
|
+
that stylesheet the MathML copy rehype-katex emits for screen readers loses
|
|
34
|
+
the rule that clips it out of view, and every formula showed up twice: once
|
|
35
|
+
as unstyled MathML source and once as the real KaTeX drawing beside it. The
|
|
36
|
+
deck now imports the stylesheet too, and `sample-layouts` gained a Math
|
|
37
|
+
section so the deck path is covered the way the article path already was.
|
|
38
|
+
- **Inline math in a slide was oversized** — the `font-size: 1.1em` that trims
|
|
39
|
+
KaTeX's 1.21em default was scoped to `.prose`, which a slide is not. It now
|
|
40
|
+
applies under `.aas-slide-inner` as well, so a formula mid-sentence matches
|
|
41
|
+
the text around it on a slide the same as in an article.
|
|
42
|
+
|
|
14
43
|
## [1.25.0] - 2026-08-31
|
|
15
44
|
|
|
16
45
|
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.
|
|
4
|
+
"version": "1.25.2",
|
|
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
|
|
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.
|
|
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';
|
package/src/styles/global.css
CHANGED
|
@@ -883,10 +883,20 @@ 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
|
-
|
|
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
|
}
|
|
892
|
+
/* Inline math inherits the paragraph it sits in and so scales with it, but a
|
|
893
|
+
display block is a direct child of `.aas-slide-inner`, whose own font-size is
|
|
894
|
+
the 1rem root — not the clamp() that slide prose gets. Left alone a centred
|
|
895
|
+
formula renders at ~17px beside 26px text, reading as a footnote to the
|
|
896
|
+
slide rather than the point of it. Hand it the same scale as `p`. */
|
|
897
|
+
.aas-slide-inner .katex-display {
|
|
898
|
+
font-size: clamp(1.2rem, 2vw, 1.65rem);
|
|
899
|
+
}
|
|
890
900
|
/* KaTeX's fonts carry no Hangul, kana or Han glyphs, so for `\text{처리량}` it
|
|
891
901
|
tags the run with `.hangul_fallback` (or `.cjk_fallback` / `.brahmic_fallback`)
|
|
892
902
|
and ships NO rule for them — the font is left to the site on purpose. Without
|