@writedocs/generator 0.10.14 → 0.10.16

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.
Files changed (48) hide show
  1. package/astro.config.mjs +610 -572
  2. package/package.json +1 -1
  3. package/src/cli/generate-api-pages.js +418 -384
  4. package/src/cli/write-redirects-file.js +141 -116
  5. package/src/components/Accordion.astro +2 -1
  6. package/src/components/Callout.astro +1 -1
  7. package/src/components/CopyPageMenu.astro +1 -1
  8. package/src/components/Image.astro +19 -3
  9. package/src/components/Parameter.astro +11 -6
  10. package/src/components/Visibility.astro +11 -1
  11. package/src/layout/BaseLayout.astro +896 -831
  12. package/src/layout/components/AnalyticsScripts.astro +45 -77
  13. package/src/layout/components/Breadcrumbs.astro +1 -1
  14. package/src/layout/components/ConsentBanner.astro +118 -0
  15. package/src/layout/components/MobileMenu.astro +3 -2
  16. package/src/layout/components/Sidebar.astro +2 -2
  17. package/src/layout/components/SiteFooter.astro +3 -2
  18. package/src/layout/components/TopBar.astro +3 -2
  19. package/src/layout/styles/base.css +30 -0
  20. package/src/lib/agent-directive.js +47 -0
  21. package/src/lib/agent-markdown.js +22 -2
  22. package/src/lib/components-to-markdown.js +297 -0
  23. package/src/lib/config-schema.js +97 -10
  24. package/src/lib/config-schema.ts +1882 -1768
  25. package/src/lib/consent.js +102 -0
  26. package/src/lib/font-fallback.js +79 -0
  27. package/src/lib/image-size.js +140 -0
  28. package/src/lib/item-pages.js +63 -0
  29. package/src/lib/json-ld.js +127 -0
  30. package/src/lib/json-schema-descriptions.js +226 -212
  31. package/src/lib/last-modified.js +52 -0
  32. package/src/lib/link-check.js +506 -500
  33. package/src/lib/mcp-index.ts +1 -1
  34. package/src/lib/meta-description.js +41 -0
  35. package/src/lib/mintlify-convert.js +605 -603
  36. package/src/lib/moved-api-pages.js +54 -0
  37. package/src/lib/openapi-markdown.ts +16 -6
  38. package/src/lib/project-files-integration.js +61 -0
  39. package/src/lib/project-files.js +126 -0
  40. package/src/lib/rehype-image-loading.js +71 -0
  41. package/src/lib/robots-txt.js +16 -0
  42. package/src/lib/seo-tags.js +137 -0
  43. package/src/lib/styles-asset-integration.js +21 -3
  44. package/src/pages/[...slug].astro +22 -3
  45. package/src/pages/[...slug].md.ts +15 -5
  46. package/src/pages/llms-full.txt.ts +1 -1
  47. package/src/scripts/consent.ts +62 -0
  48. package/writedocs.schema.json +100 -0
@@ -1,116 +1,141 @@
1
- import fs from 'node:fs';
2
- import path from 'node:path';
3
- import { readConfigText } from '../lib/config-file.js';
4
-
5
- // Astro's own `output: 'static'` redirects (both writedocs.json's `redirects`
6
- // feature and the automatic "/" -> first-nav-page redirect in
7
- // [...slug].astro) are never real server/edge redirects - with no adapter
8
- // installed, Astro can only ever emit a client-side
9
- // `<meta http-equiv="refresh">` page (see redirectSchema's own comment in
10
- // lib/config.ts for why `permanent`/status-code isn't even offered as a
11
- // config option). That page is a real, working redirect, but it's a flash
12
- // of unstyled content before the browser honors the meta-refresh - visibly
13
- // bad on a deployed site, and exactly what a reader lands on for a second
14
- // or more depending on network/host latency.
15
- //
16
- // Cloudflare Pages and Netlify both read a `_redirects` file at the root
17
- // of the deployed output and turn each line into a real edge-level
18
- // redirect - no page ever renders, no flash. This step generates that file
19
- // as a purely additive improvement: hosts that honor `_redirects` get an
20
- // instant real redirect, and every other static host (S3, GitHub Pages,
21
- // etc.) falls back to the meta-refresh page Astro already generates, which
22
- // keeps working exactly as before. Neither this file nor its absence ever
23
- // changes what Astro itself builds.
24
- // `contentDir` rather than a pre-loaded config object: this runs from
25
- // build.js, invoked by plain `node`, not through Astro/Vite's TS
26
- // transform - loadDocsConfig() (lib/config.ts) can't be imported here the
27
- // way astro.config.mjs and every .astro file import it. writedocs.json has
28
- // already been through preflightCheck() (valid JSON) and Astro's own
29
- // loadDocsConfig() call inside astro.config.mjs (schema-valid, or the
30
- // build above would already have failed) by the time this runs, so a
31
- // second, un-validated JSON.parse() here is safe - this only ever reads
32
- // the one `redirects` array back out, nothing that needs zod's defaults
33
- // or transforms.
34
- export function writeRedirectsFile(distDir, contentDir) {
35
- const writedocsJson = JSON.parse(readConfigText(contentDir));
36
- const redirects = writedocsJson.redirects ?? [];
37
- const lines = [];
38
-
39
- // writedocs.json's own `redirects` array - one line per entry, always 301
40
- // (there's nowhere else in this project to source a status code from;
41
- // see redirectSchema's comment in lib/config.ts on why the schema itself
42
- // has no field for one - a redirect a site author deliberately
43
- // configured is safe to treat as permanent).
44
- for (const { source, destination } of redirects) {
45
- lines.push(`${source} ${destination} 301`);
46
- }
47
-
48
- // The automatic root "/" redirect (see the `rootRedirect` block in
49
- // [...slug].astro's getStaticPaths()) isn't reachable from here without
50
- // re-deriving the same first-nav-page resolution Astro already did -
51
- // instead, read it straight back out of the meta-refresh tag in the
52
- // already-built dist/index.html. If writedocs.json already defines its own
53
- // `/` redirect above, that one wins (first match wins in `_redirects`,
54
- // and it's already listed first) - skip the automatic one entirely
55
- // rather than emit a second, unreachable rule for the same path.
56
- const hasExplicitRootRedirect = redirects.some((r) => r.source === '/');
57
- const indexHtmlPath = path.join(distDir, 'index.html');
58
- if (!hasExplicitRootRedirect && fs.existsSync(indexHtmlPath)) {
59
- const html = fs.readFileSync(indexHtmlPath, 'utf8');
60
- const match = html.match(/<meta http-equiv="refresh" content="\d+;\s*url=([^"]+)"/i);
61
- // 302, not 301: see [...slug].astro - a browser keeps a 301 for good,
62
- // and "/" stops redirecting once the site gets a home page.
63
- if (match) lines.push(`/ ${match[1]} 302`);
64
- }
65
-
66
- // Folder addresses redirecting to the first page under them
67
- // (lib/folder-redirects.js). Read back from the built pages like "/"
68
- // above: Astro writes a temporary (302) redirect's page with a 2-second
69
- // refresh and a permanent one's with 0 - writedocs.json's own redirects
70
- // and `url` pages are permanent, so the 2-second ones are exactly the
71
- // automatic folder redirects. (Read before rewrite-redirect-pages.js makes
72
- // every redirect page go at once.)
73
- for (const { url, target } of temporaryRedirectPages(distDir)) {
74
- lines.push(`${url} ${target} 302`, `${url.replace(/\/$/, '')} ${target} 302`);
75
- }
76
-
77
- if (lines.length === 0) return;
78
-
79
- const generated = [
80
- '# Generated by writedocs (see src/cli/write-redirects-file.js).',
81
- '# Gives Cloudflare Pages / Netlify a real edge redirect for the same',
82
- "# paths Astro's own static-mode <meta http-equiv=\"refresh\"> pages",
83
- '# already cover - other static hosts keep using those pages as-is.',
84
- ...lines,
85
- '',
86
- ].join('\n');
87
-
88
- const redirectsPath = path.join(distDir, '_redirects');
89
- // A hand-written public/_redirects is already copied into dist by Astro
90
- // by this point - preserve it (and its priority: first match wins) by
91
- // appending after it rather than overwriting.
92
- const existing = fs.existsSync(redirectsPath) ? fs.readFileSync(redirectsPath, 'utf8').replace(/\s*$/, '\n\n') : '';
93
- fs.writeFileSync(redirectsPath, existing + generated);
94
- }
95
-
96
- /** Astro's pages for temporary redirects below the site's root, as
97
- * `{ url: "/docs/creator/", target }`. */
98
- function temporaryRedirectPages(distDir) {
99
- const found = [];
100
- const walk = (dir) => {
101
- for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
102
- const full = path.join(dir, entry.name);
103
- if (entry.isDirectory()) {
104
- if (!['_astro', 'pagefind', 'pagefind-spaces'].includes(entry.name)) walk(full);
105
- continue;
106
- }
107
- if (entry.name !== 'index.html' || dir === distDir) continue;
108
- const html = fs.readFileSync(full, 'utf8');
109
- if (!html.includes('<title>Redirecting to:')) continue;
110
- const match = html.match(/<meta http-equiv="refresh" content="2;\s*url=([^"]+)"/i);
111
- if (match) found.push({ url: `/${path.relative(distDir, dir).split(path.sep).join('/')}/`, target: match[1] });
112
- }
113
- };
114
- walk(distDir);
115
- return found.sort((a, b) => a.url.localeCompare(b.url));
116
- }
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { readConfigText } from '../lib/config-file.js';
4
+ import { readMovedApiPages } from '../lib/moved-api-pages.js';
5
+
6
+ // Astro's own `output: 'static'` redirects (both writedocs.json's `redirects`
7
+ // feature and the automatic "/" -> first-nav-page redirect in
8
+ // [...slug].astro) are never real server/edge redirects - with no adapter
9
+ // installed, Astro can only ever emit a client-side
10
+ // `<meta http-equiv="refresh">` page (see redirectSchema's own comment in
11
+ // lib/config.ts for why `permanent`/status-code isn't even offered as a
12
+ // config option). That page is a real, working redirect, but it's a flash
13
+ // of unstyled content before the browser honors the meta-refresh - visibly
14
+ // bad on a deployed site, and exactly what a reader lands on for a second
15
+ // or more depending on network/host latency.
16
+ //
17
+ // Cloudflare Pages and Netlify both read a `_redirects` file at the root
18
+ // of the deployed output and turn each line into a real edge-level
19
+ // redirect - no page ever renders, no flash. This step generates that file
20
+ // as a purely additive improvement: hosts that honor `_redirects` get an
21
+ // instant real redirect, and every other static host (S3, GitHub Pages,
22
+ // etc.) falls back to the meta-refresh page Astro already generates, which
23
+ // keeps working exactly as before. Neither this file nor its absence ever
24
+ // changes what Astro itself builds.
25
+ // `contentDir` rather than a pre-loaded config object: this runs from
26
+ // build.js, invoked by plain `node`, not through Astro/Vite's TS
27
+ // transform - loadDocsConfig() (lib/config.ts) can't be imported here the
28
+ // way astro.config.mjs and every .astro file import it. writedocs.json has
29
+ // already been through preflightCheck() (valid JSON) and Astro's own
30
+ // loadDocsConfig() call inside astro.config.mjs (schema-valid, or the
31
+ // build above would already have failed) by the time this runs, so a
32
+ // second, un-validated JSON.parse() here is safe - this only ever reads
33
+ // the one `redirects` array back out, nothing that needs zod's defaults
34
+ // or transforms.
35
+ export function writeRedirectsFile(distDir, contentDir) {
36
+ const writedocsJson = JSON.parse(readConfigText(contentDir));
37
+ const redirects = writedocsJson.redirects ?? [];
38
+ const lines = [];
39
+
40
+ // writedocs.json's own `redirects` array - one line per entry, always 301
41
+ // (there's nowhere else in this project to source a status code from;
42
+ // see redirectSchema's comment in lib/config.ts on why the schema itself
43
+ // has no field for one - a redirect a site author deliberately
44
+ // configured is safe to treat as permanent).
45
+ // Each address in both forms, with and without the trailing slash:
46
+ // `_redirects` matches the path as it was requested, and a rule for
47
+ // "/old" alone left "/old/" to the fallback page - a 200, not a 301.
48
+ // An address the site lists itself keeps its own destination.
49
+ const listed = new Set(redirects.map((r) => r.source));
50
+ for (const { source, destination } of redirects) {
51
+ lines.push(`${source} ${destination} 301`);
52
+ const other = otherSlashForm(source);
53
+ if (other && !listed.has(other)) lines.push(`${other} ${destination} 301`);
54
+ }
55
+ // Generated API pages that changed address (lib/moved-api-pages.js) -
56
+ // after the site's own, which win for the same address (first match).
57
+ // With and without the trailing slash: `_redirects` matches the path
58
+ // as requested.
59
+ for (const { source, destination } of readMovedApiPages(contentDir)) {
60
+ if (redirects.some((r) => r.source.replace(/\/+$/, '') === source)) continue;
61
+ lines.push(`${source} ${destination} 301`, `${source}/ ${destination} 301`);
62
+ }
63
+
64
+ // The automatic root "/" redirect (see the `rootRedirect` block in
65
+ // [...slug].astro's getStaticPaths()) isn't reachable from here without
66
+ // re-deriving the same first-nav-page resolution Astro already did -
67
+ // instead, read it straight back out of the meta-refresh tag in the
68
+ // already-built dist/index.html. If writedocs.json already defines its own
69
+ // `/` redirect above, that one wins (first match wins in `_redirects`,
70
+ // and it's already listed first) - skip the automatic one entirely
71
+ // rather than emit a second, unreachable rule for the same path.
72
+ const hasExplicitRootRedirect = redirects.some((r) => r.source === '/');
73
+ const indexHtmlPath = path.join(distDir, 'index.html');
74
+ if (!hasExplicitRootRedirect && fs.existsSync(indexHtmlPath)) {
75
+ const html = fs.readFileSync(indexHtmlPath, 'utf8');
76
+ const match = html.match(/<meta http-equiv="refresh" content="\d+;\s*url=([^"]+)"/i);
77
+ // 302, not 301: see [...slug].astro - a browser keeps a 301 for good,
78
+ // and "/" stops redirecting once the site gets a home page.
79
+ if (match) lines.push(`/ ${match[1]} 302`);
80
+ }
81
+
82
+ // Folder addresses redirecting to the first page under them
83
+ // (lib/folder-redirects.js). Read back from the built pages like "/"
84
+ // above: Astro writes a temporary (302) redirect's page with a 2-second
85
+ // refresh and a permanent one's with 0 - writedocs.json's own redirects
86
+ // and `url` pages are permanent, so the 2-second ones are exactly the
87
+ // automatic folder redirects. (Read before rewrite-redirect-pages.js makes
88
+ // every redirect page go at once.)
89
+ for (const { url, target } of temporaryRedirectPages(distDir)) {
90
+ lines.push(`${url} ${target} 302`, `${url.replace(/\/$/, '')} ${target} 302`);
91
+ }
92
+
93
+ if (lines.length === 0) return;
94
+
95
+ const generated = [
96
+ '# Generated by writedocs (see src/cli/write-redirects-file.js).',
97
+ '# Gives Cloudflare Pages / Netlify a real edge redirect for the same',
98
+ "# paths Astro's own static-mode <meta http-equiv=\"refresh\"> pages",
99
+ '# already cover - other static hosts keep using those pages as-is.',
100
+ ...lines,
101
+ '',
102
+ ].join('\n');
103
+
104
+ const redirectsPath = path.join(distDir, '_redirects');
105
+ // A hand-written public/_redirects is already copied into dist by Astro
106
+ // by this point - preserve it (and its priority: first match wins) by
107
+ // appending after it rather than overwriting.
108
+ const existing = fs.existsSync(redirectsPath) ? fs.readFileSync(redirectsPath, 'utf8').replace(/\s*$/, '\n\n') : '';
109
+ fs.writeFileSync(redirectsPath, existing + generated);
110
+ }
111
+
112
+ /** "/old" for "/old/" and the reverse - null for the root, and for an
113
+ * address that names a file ("/feed.xml"), which has one form only. */
114
+ export function otherSlashForm(source) {
115
+ if (typeof source !== 'string' || source === '/' || !source.startsWith('/')) return null;
116
+ if (source.endsWith('/')) return source.slice(0, -1) || null;
117
+ if (/\.[a-z0-9]+$/i.test(source.split('/').pop())) return null;
118
+ return `${source}/`;
119
+ }
120
+
121
+ /** Astro's pages for temporary redirects below the site's root, as
122
+ * `{ url: "/docs/creator/", target }`. */
123
+ function temporaryRedirectPages(distDir) {
124
+ const found = [];
125
+ const walk = (dir) => {
126
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
127
+ const full = path.join(dir, entry.name);
128
+ if (entry.isDirectory()) {
129
+ if (!['_astro', 'pagefind', 'pagefind-spaces'].includes(entry.name)) walk(full);
130
+ continue;
131
+ }
132
+ if (entry.name !== 'index.html' || dir === distDir) continue;
133
+ const html = fs.readFileSync(full, 'utf8');
134
+ if (!html.includes('<title>Redirecting to:')) continue;
135
+ const match = html.match(/<meta http-equiv="refresh" content="2;\s*url=([^"]+)"/i);
136
+ if (match) found.push({ url: `/${path.relative(distDir, dir).split(path.sep).join('/')}/`, target: match[1] });
137
+ }
138
+ };
139
+ walk(distDir);
140
+ return found.sort((a, b) => a.url.localeCompare(b.url));
141
+ }
@@ -42,8 +42,9 @@ const titleId = _titleId ?? slugify(plainText(title));
42
42
  <span class="wd-accordion-text">
43
43
  <span class="wd-accordion-title" id={titleId}>
44
44
  {Astro.slots.has("wd-title") ? <slot name="wd-title" /> : title}
45
- <a class="wd-heading-anchor" href={`#${titleId}`} aria-label="Link to this section"> # </a>
45
+ <a class="wd-heading-anchor" href={`#${titleId}`} aria-label="Link to this section" data-markdown-ignore> # </a>
46
46
  </span>
47
+ {" "}
47
48
  {description && <span class="wd-accordion-description">{description}</span>}
48
49
  </span>
49
50
  </span>
@@ -64,7 +64,7 @@ const titleId = title ? (_titleId ?? slugify(plainText(title))) : undefined;
64
64
  title && (
65
65
  <div class="wd-callout-title" id={titleId}>
66
66
  {titleHtml ? <Fragment set:html={titleHtml} /> : title}
67
- <a class="wd-heading-anchor" href={`#${titleId}`} aria-label="Link to this section">
67
+ <a class="wd-heading-anchor" href={`#${titleId}`} aria-label="Link to this section" data-markdown-ignore>
68
68
  #
69
69
  </a>
70
70
  </div>
@@ -127,7 +127,7 @@ const single = !showCopy && items.length === 1 ? items[0] : null;
127
127
  const hasDropdown = items.length > 0 && !single;
128
128
  ---
129
129
  {(showCopy || items.length > 0) && (
130
- <div class="wd-copy-page-split" data-pagefind-ignore="all">
130
+ <div class="wd-copy-page-split" data-pagefind-ignore="all" data-markdown-ignore>
131
131
  {showCopy && (
132
132
  <button type="button" class:list={['wd-copy-page-primary', { 'wd-copy-page-alone': !hasDropdown }]} data-copy-page data-md-path={mdPath} aria-label="Copy page as Markdown">
133
133
  <Icon name="lucide:copy" class="wd-copy-page-icon" />
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  import { extraClasses } from './class-names';
3
+ import { imageFileFor, imageSize } from '../lib/image-size.js';
3
4
  // Block-level (own line, centered) - unlike Hint (inline/text-level),
4
5
  // this is meant to be dropped in on its own the way Callout/Card are.
5
6
  //
@@ -60,8 +61,23 @@ interface Props {
60
61
  // lib/image-zoom-rules.js handles both cases identically rather than
61
62
  // needing to special-case this component.
62
63
  noZoom?: boolean;
64
+ // "lazy" (the default): the browser fetches the image when the reader
65
+ // gets near it. "eager": with the page - for an image at the very top.
66
+ // The page's first image gets "eager" by itself
67
+ // (lib/rehype-image-loading.js).
68
+ loading?: "lazy" | "eager";
63
69
  }
64
- const { src, srcDark, size, alt = "", caption, noZoom } = Astro.props as Props;
70
+ const { src, srcDark, size, alt = "", caption, noZoom, loading = "lazy" } = Astro.props as Props;
71
+ // Each file's own pixel size, as width/height: the browser keeps the
72
+ // image's place before it arrives, so the text below doesn't jump. The
73
+ // CSS below already has height: auto, so the image still scales.
74
+ const contentDir = process.env.WRITEDOCS_CONTENT_DIR || process.cwd();
75
+ const sizeOf = (address?: string) => {
76
+ const file = address ? imageFileFor(address, contentDir) : null;
77
+ return (file && imageSize(file)) || { width: undefined, height: undefined };
78
+ };
79
+ const light = sizeOf(src);
80
+ const dark = sizeOf(srcDark);
65
81
  const sizeStyle = size ? `--wd-image-size:${size}` : undefined;
66
82
  ---
67
83
 
@@ -69,8 +85,8 @@ const sizeStyle = size ? `--wd-image-size:${size}` : undefined;
69
85
  class:list={["wd-image-figure", caption && "wd-image-figure-framed", srcDark && "wd-image-has-dark", extraClasses(Astro.props)]}
70
86
  style={sizeStyle}
71
87
  >
72
- <img src={src} alt={alt} class="wd-image wd-image-light" nozoom={noZoom || undefined} />
73
- {srcDark && <img src={srcDark} alt={alt} class="wd-image wd-image-dark" nozoom={noZoom || undefined} />}
88
+ <img src={src} alt={alt} class="wd-image wd-image-light" nozoom={noZoom || undefined} loading={loading} decoding="async" width={light.width} height={light.height} />
89
+ {srcDark && <img src={srcDark} alt={alt} class="wd-image wd-image-dark" nozoom={noZoom || undefined} loading={loading} decoding="async" width={dark.width} height={dark.height} />}
74
90
  {caption && <figcaption class="wd-image-caption">{caption}</figcaption>}
75
91
  </figure>
76
92
  <style>
@@ -41,12 +41,17 @@ const hasDefault = defaultValue !== undefined && defaultValue !== null && defaul
41
41
 
42
42
  <div class:list={["wd-parameter", { "wd-parameter-deprecated": deprecated }, extraClasses(Astro.props)]}>
43
43
  <div class="wd-parameter-head">
44
- {pre.map((label) => <span class="wd-parameter-label">{label}</span>)}
45
- <span class="wd-parameter-name">{name}</span>
46
- {type && <span class="wd-parameter-type">{type}</span>}
47
- {required && <span class="wd-parameter-required">required</span>}
48
- {deprecated && <span class="wd-parameter-deprecated-badge">deprecated</span>}
49
- {post.map((label) => <span class="wd-parameter-label">{label}</span>)}
44
+ {
45
+ /* A space after each piece: the row is laid out by its flex gap, but read
46
+ as text - by a screen reader, a copy, an AI agent - "amount integer
47
+ required" must not run together as "amountintegerrequired". */
48
+ }
49
+ {pre.map((label) => <Fragment><span class="wd-parameter-label">{label}</span>{" "}</Fragment>)}
50
+ <span class="wd-parameter-name">{name}</span>{" "}
51
+ {type && <Fragment><span class="wd-parameter-type">{type}</span>{" "}</Fragment>}
52
+ {required && <Fragment><span class="wd-parameter-required">required</span>{" "}</Fragment>}
53
+ {deprecated && <Fragment><span class="wd-parameter-deprecated-badge">deprecated</span>{" "}</Fragment>}
54
+ {post.map((label) => <Fragment><span class="wd-parameter-label">{label}</span>{" "}</Fragment>)}
50
55
  {hasDefault && <span class="wd-parameter-default">default: {String(defaultValue)}</span>}
51
56
  </div>
52
57
  <div class="wd-parameter-body">
@@ -8,4 +8,14 @@ interface Props {
8
8
  }
9
9
  const { for: audience = 'humans' } = Astro.props as Props;
10
10
  ---
11
- {audience !== 'agents' && <slot />}
11
+ {
12
+ /* What only people see is marked as such: the page's Markdown copy leaves it
13
+ out (lib/visibility.js), and `data-markdown-ignore` tells a tool comparing
14
+ the two that it's meant to. `display: contents`, so the wrapper changes
15
+ nothing about the layout of what's inside. */
16
+ }
17
+ {audience !== 'agents' && (
18
+ <span data-markdown-ignore style="display: contents">
19
+ <slot />
20
+ </span>
21
+ )}