@writedocs/generator 0.10.20 → 0.11.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.
Files changed (53) hide show
  1. package/astro.config.mjs +32 -8
  2. package/package.json +3 -1
  3. package/src/cli/astro-output.js +44 -11
  4. package/src/cli/base-path-layout.js +44 -0
  5. package/src/cli/build.js +18 -9
  6. package/src/cli/check-built-styles.js +41 -33
  7. package/src/cli/dev.js +21 -4
  8. package/src/cli/run-pagefind.js +154 -148
  9. package/src/cli/write-mcp-files.js +103 -96
  10. package/src/cli/write-redirects-file.js +25 -8
  11. package/src/components/AppIcon.astro +51 -50
  12. package/src/components/Card.astro +193 -192
  13. package/src/components/CopyPageMenu.astro +374 -370
  14. package/src/components/Hint.astro +188 -187
  15. package/src/components/Icon.astro +72 -71
  16. package/src/components/Image.astro +3 -2
  17. package/src/components/Tile.astro +67 -66
  18. package/src/components/Video.astro +137 -136
  19. package/src/layout/BaseLayout.astro +21 -12
  20. package/src/layout/components/AnalyticsScripts.astro +6 -2
  21. package/src/layout/components/Breadcrumbs.astro +98 -97
  22. package/src/layout/components/ConsentBanner.astro +119 -118
  23. package/src/layout/components/MobileMenu.astro +229 -228
  24. package/src/layout/components/NavTree.astro +393 -392
  25. package/src/layout/components/Sidebar.astro +232 -231
  26. package/src/layout/components/SiteFooter.astro +87 -86
  27. package/src/layout/components/TopBar.astro +386 -385
  28. package/src/lib/agent-markdown.js +164 -162
  29. package/src/lib/asset-dimensions.js +89 -89
  30. package/src/lib/base-path.js +90 -0
  31. package/src/lib/config-schema.js +10 -0
  32. package/src/lib/config-schema.ts +17 -0
  33. package/src/lib/config.ts +1314 -1289
  34. package/src/lib/consent.js +108 -102
  35. package/src/lib/json-schema-descriptions.js +1 -0
  36. package/src/lib/link-check.js +7 -2
  37. package/src/lib/llms-index.ts +90 -88
  38. package/src/lib/mcp-dev-integration.js +65 -60
  39. package/src/lib/mcp-index.ts +102 -101
  40. package/src/lib/project-files-integration.js +2 -2
  41. package/src/lib/rehype-base-path.js +62 -0
  42. package/src/lib/robots-txt.js +21 -16
  43. package/src/lib/seo-tags.js +155 -140
  44. package/src/lib/site-base.ts +27 -0
  45. package/src/lib/styles-asset-integration.js +23 -10
  46. package/src/lib/wdignore-cases.json +195 -195
  47. package/src/lib/wdignore.js +177 -177
  48. package/src/pages/404.astro +63 -62
  49. package/src/pages/[...slug].astro +1604 -1597
  50. package/src/pages/[...slug].md.ts +93 -93
  51. package/src/pages/llms-full.txt.ts +88 -86
  52. package/src/scripts/search.ts +245 -237
  53. package/writedocs.schema.json +6 -0
@@ -1,392 +1,393 @@
1
- ---
2
- import { navTreeContainsSlug, isExternalHref, type NavTreeNode } from "../../lib/config";
3
- import AppIcon from "../../components/AppIcon.astro";
4
- import { methodClass } from "../../lib/openapi-render";
5
-
6
- interface Props {
7
- nodes: NavTreeNode[];
8
- hrefForSlug: (slug: string) => string;
9
- currentSlug: string;
10
- depth?: number;
11
- }
12
-
13
- const { nodes, hrefForSlug, currentSlug, depth = 0 } = Astro.props as Props;
14
- ---
15
-
16
- <ul class={`wd-nav-list wd-nav-depth-${depth}`}>
17
- {
18
- nodes.map((node) => {
19
- if (node.kind === "page") {
20
- return (
21
- <li>
22
- <a href={hrefForSlug(node.slug)} class={node.slug === currentSlug ? "active" : ""}>
23
- {node.method && (
24
- <span class={`wd-nav-method wd-nav-method-${methodClass(node.method)}`}>{node.method}</span>
25
- )}
26
- {node.icon && <AppIcon icon={node.icon} class="wd-nav-page-icon" />}
27
- <span class="wd-nav-title">{node.title}</span>
28
- {node.deprecated && <span class="wd-nav-tag wd-nav-tag-deprecated">Deprecated</span>}
29
- {node.tag && <span class="wd-nav-tag">{node.tag}</span>}
30
- </a>
31
- </li>
32
- );
33
- }
34
-
35
- if (node.kind === "link") {
36
- // A bare external link sitting directly in the page tree (see
37
- // NavItem's `{ label, href }` leaf in lib/config.ts) - styled like
38
- // a page row, but never "active" (it's not a content page) and
39
- // always opens in a new tab since it's meant to point off-site.
40
- const external = isExternalHref(node.href);
41
- return (
42
- <li>
43
- <a
44
- href={node.href}
45
- class="wd-nav-link-leaf"
46
- target={external ? "_blank" : undefined}
47
- rel={external ? "noopener noreferrer" : undefined}
48
- >
49
- <span>{node.label}</span>
50
- {external && (
51
- <svg class="wd-nav-external-icon" width="10" height="10" viewBox="0 0 10 10" aria-hidden="true">
52
- <path
53
- d="M3 1.5H8.5V7M8.5 1.5L1.5 8.5"
54
- stroke="currentColor"
55
- stroke-width="1.2"
56
- fill="none"
57
- stroke-linecap="round"
58
- stroke-linejoin="round"
59
- />
60
- </svg>
61
- )}
62
- </a>
63
- </li>
64
- );
65
- }
66
-
67
- if (depth === 0) {
68
- // Top-level group = a static sidebar section title, never a
69
- // disclosure control - matches the reference design where the first
70
- // group level is just a bold label above its pages.
71
- return (
72
- <li class="wd-nav-group">
73
- <div class="wd-nav-section-title">
74
- {node.pageSlug ? (
75
- <a href={hrefForSlug(node.pageSlug)} class={node.pageSlug === currentSlug ? "active" : ""}>
76
- {node.label}
77
- </a>
78
- ) : (
79
- node.label
80
- )}
81
- </div>
82
- <Astro.self nodes={node.children} hrefForSlug={hrefForSlug} currentSlug={currentSlug} depth={depth + 1} />
83
- </li>
84
- );
85
- }
86
-
87
- // Depth >= 1: a nested group renders as a collapsible row, styled and
88
- // inset exactly like a sibling page link, with a chevron on the
89
- // right. Defaults open whenever the active page lives anywhere inside
90
- // it (itself or a descendant), so landing on a child page never
91
- // leaves its own parent collapsed.
92
- const isActive = node.pageSlug === currentSlug;
93
- const open = isActive || navTreeContainsSlug(node.children, currentSlug);
94
- return (
95
- <li class="wd-nav-collapsible">
96
- <details open={open}>
97
- <summary class={isActive ? "active" : ""}>
98
- {node.pageSlug ? (
99
- <a href={hrefForSlug(node.pageSlug)} class={isActive ? "active" : ""}>
100
- {node.label}
101
- </a>
102
- ) : (
103
- <span class="wd-nav-group-label">{node.label}</span>
104
- )}
105
- <svg class="wd-nav-chevron" width="10" height="10" viewBox="0 0 10 10" aria-hidden="true">
106
- <path
107
- d="M3.5 2L6.5 5L3.5 8"
108
- stroke="currentColor"
109
- stroke-width="1.4"
110
- fill="none"
111
- stroke-linecap="round"
112
- stroke-linejoin="round"
113
- />
114
- </svg>
115
- </summary>
116
- <Astro.self nodes={node.children} hrefForSlug={hrefForSlug} currentSlug={currentSlug} depth={depth + 1} />
117
- </details>
118
- </li>
119
- );
120
- })
121
- }
122
- </ul>
123
-
124
- <style>
125
- .wd-nav-list {
126
- list-style: none;
127
- margin: 0;
128
- padding: 0;
129
- }
130
-
131
- .wd-nav-list li a,
132
- .wd-nav-list li summary {
133
- border-left: 1px solid transparent;
134
- }
135
-
136
- .wd-nav-list li a:not(summary a):hover,
137
- .wd-nav-list li summary:hover {
138
- border-left: 1px solid var(--wd-primary);
139
- }
140
-
141
- .wd-nav-list li a.active:not(summary a),
142
- .wd-nav-list li summary.active {
143
- border-left: 1px solid var(--wd-primary);
144
- }
145
-
146
- .wd-nav-depth-0 {
147
- margin-bottom: 1.25rem;
148
- }
149
- /* Space between a top-level group and whatever sits next to it - another
150
- group, or a page outside any group - so each group reads as its own
151
- block. */
152
- .wd-nav-depth-0 > .wd-nav-group + li,
153
- .wd-nav-depth-0 > li + .wd-nav-group {
154
- margin-top: 2rem;
155
- }
156
- .wd-nav-section-title {
157
- padding: 0;
158
- margin-bottom: 0.4rem;
159
- color: var(--wd-nav-title);
160
- font-size: 0.75rem;
161
- font-weight: 600;
162
- text-transform: uppercase;
163
- letter-spacing: 0.04em;
164
- }
165
- /* Overrides `.wd-nav-list a`'s own block/padding/font-size/pill-when-
166
- active styling further below - without this, a group-with-a-page's
167
- title (e.g. "Concepts" linking to its own overview page) inherits
168
- the same big rounded background pill a regular page row gets when
169
- active, which looks completely out of place sitting next to a
170
- plain-text sibling title like "Getting Started". A linked section
171
- title should still read as a section title - same size/weight/
172
- case/color as an unlinked one - just tinted primary on hover/active
173
- instead. The extra `.wd-nav-group` ancestor qualifier (2 classes)
174
- is load-bearing, not decoration: `.wd-nav-section-title a` alone
175
- has the exact same specificity as `.wd-nav-list a` (1 class + 1
176
- type each), so whichever rule happens to sit later in the
177
- stylesheet would silently win regardless of intent - this avoids
178
- that tie entirely. Mirrors the same "override to neutral, re-apply
179
- only color" pattern already used for .wd-nav-collapsible summary a
180
- below (which sidesteps the same tie via a `summary` type selector
181
- instead). */
182
- .wd-nav-group .wd-nav-section-title a {
183
- display: inline;
184
- padding: 0;
185
- border-radius: 0;
186
- background: none;
187
- color: inherit;
188
- font-size: inherit;
189
- font-weight: inherit;
190
- text-decoration: none;
191
- }
192
- .wd-nav-group .wd-nav-section-title a.active,
193
- .wd-nav-group .wd-nav-section-title a:hover {
194
- background: none;
195
- color: var(--wd-primary);
196
- }
197
- .wd-nav-depth-1,
198
- .wd-nav-depth-2,
199
- .wd-nav-depth-3 {
200
- margin-bottom: 0.5rem;
201
- border-left: 1px solid var(--wd-border);
202
- }
203
-
204
- .wd-nav-depth-2,
205
- .wd-nav-depth-3 {
206
- margin-bottom: 0.5rem;
207
- margin-left: 0.75rem;
208
- border-left: 1px solid var(--wd-border);
209
- }
210
- .wd-nav-list a {
211
- display: flex;
212
- align-items: center;
213
- gap: 0.45rem;
214
- padding: 0.2rem 0.75rem;
215
- margin: 0.1rem 0;
216
- border-radius: 0 0.4rem 0.4rem 0;
217
- text-decoration: none;
218
- color: var(--wd-nav-text);
219
- font-size: 0.9rem;
220
- }
221
- /* Primary-tinted rather than a neutral surface gray - a faint preview
222
- of the active pill's own color (12% alpha), at half its strength, so
223
- hover reads as "this could become active" instead of a generic
224
- hover state shared with every other clickable thing on the page. */
225
- .wd-nav-list a:hover {
226
- background: color-mix(in srgb, var(--wd-primary) 6%, transparent);
227
- color: var(--wd-nav-title);
228
- }
229
- .wd-nav-list a.active {
230
- background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
231
- color: var(--wd-primary);
232
- font-weight: 500;
233
- }
234
- .wd-nav-title {
235
- flex: 1;
236
- min-width: 0;
237
- overflow: hidden;
238
- /* text-overflow: ellipsis;
239
- white-space: nowrap; */
240
- }
241
- /* A page's own frontmatter `icon` (Mintlify's) - :global() because
242
- AppIcon.astro renders the svg/span, not this component. */
243
- :global(svg.wd-nav-page-icon),
244
- :global(span.wd-nav-page-icon) {
245
- flex-shrink: 0;
246
- width: 1em;
247
- height: 1em;
248
- }
249
- :global(span.wd-nav-page-icon) {
250
- display: flex;
251
- align-items: center;
252
- justify-content: center;
253
- }
254
- /* Frontmatter `tag` / `deprecated` - a small pill after the title, same
255
- shape as the method badge. */
256
- .wd-nav-tag {
257
- flex-shrink: 0;
258
- padding: 0.05rem 0.4rem;
259
- border-radius: 999px;
260
- font-size: 0.62rem;
261
- font-weight: 700;
262
- line-height: 1.5;
263
- letter-spacing: 0.02em;
264
- color: var(--wd-primary);
265
- background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
266
- }
267
- .wd-nav-tag-deprecated {
268
- color: #d97706;
269
- background: color-mix(in srgb, #d97706 15%, transparent);
270
- }
271
- .wd-nav-method {
272
- flex-shrink: 0;
273
- display: inline-block;
274
- padding: 0.05rem 0.4rem;
275
- border-radius: 0.3rem;
276
- font-size: 0.62rem;
277
- font-weight: 700;
278
- letter-spacing: 0.02em;
279
- line-height: 1.5;
280
- }
281
- .wd-nav-method-get {
282
- background: color-mix(in srgb, #16a34a 15%, transparent);
283
- color: #16a34a;
284
- }
285
- .wd-nav-method-post {
286
- background: color-mix(in srgb, #2563eb 15%, transparent);
287
- color: #2563eb;
288
- }
289
- .wd-nav-method-put {
290
- background: color-mix(in srgb, #9333ea 15%, transparent);
291
- color: #9333ea;
292
- }
293
- .wd-nav-method-patch {
294
- background: color-mix(in srgb, #d97706 15%, transparent);
295
- color: #d97706;
296
- }
297
- .wd-nav-method-delete {
298
- background: color-mix(in srgb, #dc2626 15%, transparent);
299
- color: #dc2626;
300
- }
301
- .wd-nav-method-other {
302
- background: var(--wd-surface);
303
- color: var(--wd-text-muted);
304
- }
305
- .wd-nav-link-leaf {
306
- display: flex !important;
307
- align-items: center;
308
- justify-content: space-between;
309
- gap: 0.5rem;
310
- }
311
- .wd-nav-external-icon {
312
- flex-shrink: 0;
313
- color: var(--wd-text-muted);
314
- }
315
-
316
- /* Depth >= 1 group: a collapsible row that looks like a page link. */
317
- .wd-nav-collapsible details {
318
- margin: 0;
319
- }
320
- .wd-nav-collapsible summary {
321
- display: flex;
322
- align-items: center;
323
- justify-content: space-between;
324
- gap: 0.5rem;
325
- padding: 0.2rem 0.75rem;
326
- margin: 0.1rem 0;
327
- border-radius: 0 0.4rem 0.4rem 0;
328
- cursor: pointer;
329
- color: var(--wd-nav-text);
330
- font-size: 0.9rem;
331
- list-style: none;
332
- }
333
- .wd-nav-collapsible summary::-webkit-details-marker {
334
- display: none;
335
- }
336
- .wd-nav-collapsible summary::marker {
337
- content: "";
338
- }
339
- /* Same primary-tinted hover as a plain page link above. */
340
- .wd-nav-collapsible summary:hover {
341
- background: color-mix(in srgb, var(--wd-primary) 6%, transparent);
342
- color: var(--wd-nav-title);
343
- }
344
- /* When the group's own attached page is the current page, the pill
345
- background lives on <summary> itself (not the inner <a> below,
346
- which is deliberately stripped of its own background/padding so the
347
- chevron can share the row) - otherwise only the label text would be
348
- highlighted, leaving the chevron sitting outside the pill. This is
349
- the same background/radius a plain `.wd-nav-list a.active` pill
350
- uses, so an active group header looks identical to an active leaf
351
- page row instead of falling back to text-only bold+color. */
352
- .wd-nav-collapsible summary.active {
353
- background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
354
- border-left: 1px solid var(--wd-primary);
355
- }
356
-
357
- .wd-nav-collapsible summary.active > a {
358
- border-left: none;
359
- }
360
- /* Overrides `.wd-nav-list a`'s own block/padding - the row's padding is
361
- owned by <summary> now, the label inside is just flex content. Wins
362
- on specificity (class + 2 tags vs class + 1 tag) regardless of
363
- source order. */
364
- .wd-nav-collapsible summary a,
365
- .wd-nav-collapsible summary .wd-nav-group-label {
366
- display: block;
367
- padding: 0;
368
- border-radius: 0;
369
- background: none;
370
- color: inherit;
371
- font-weight: inherit;
372
- flex: 1;
373
- min-width: 0;
374
- }
375
- .wd-nav-collapsible summary a:hover {
376
- background: none;
377
- color: var(--wd-nav-title);
378
- }
379
- .wd-nav-collapsible summary a.active {
380
- background: none;
381
- color: var(--wd-primary);
382
- font-weight: 500;
383
- }
384
- .wd-nav-chevron {
385
- flex-shrink: 0;
386
- color: var(--wd-text-muted);
387
- transition: transform 0.15s ease;
388
- }
389
- .wd-nav-collapsible details[open] > summary .wd-nav-chevron {
390
- transform: rotate(90deg);
391
- }
392
- </style>
1
+ ---
2
+ import { navTreeContainsSlug, isExternalHref, type NavTreeNode } from "../../lib/config";
3
+ import AppIcon from "../../components/AppIcon.astro";
4
+ import { methodClass } from "../../lib/openapi-render";
5
+ import { siteHref } from '../../lib/site-base';
6
+
7
+ interface Props {
8
+ nodes: NavTreeNode[];
9
+ hrefForSlug: (slug: string) => string;
10
+ currentSlug: string;
11
+ depth?: number;
12
+ }
13
+
14
+ const { nodes, hrefForSlug, currentSlug, depth = 0 } = Astro.props as Props;
15
+ ---
16
+
17
+ <ul class={`wd-nav-list wd-nav-depth-${depth}`}>
18
+ {
19
+ nodes.map((node) => {
20
+ if (node.kind === "page") {
21
+ return (
22
+ <li>
23
+ <a href={siteHref(hrefForSlug(node.slug))} class={node.slug === currentSlug ? "active" : ""}>
24
+ {node.method && (
25
+ <span class={`wd-nav-method wd-nav-method-${methodClass(node.method)}`}>{node.method}</span>
26
+ )}
27
+ {node.icon && <AppIcon icon={node.icon} class="wd-nav-page-icon" />}
28
+ <span class="wd-nav-title">{node.title}</span>
29
+ {node.deprecated && <span class="wd-nav-tag wd-nav-tag-deprecated">Deprecated</span>}
30
+ {node.tag && <span class="wd-nav-tag">{node.tag}</span>}
31
+ </a>
32
+ </li>
33
+ );
34
+ }
35
+
36
+ if (node.kind === "link") {
37
+ // A bare external link sitting directly in the page tree (see
38
+ // NavItem's `{ label, href }` leaf in lib/config.ts) - styled like
39
+ // a page row, but never "active" (it's not a content page) and
40
+ // always opens in a new tab since it's meant to point off-site.
41
+ const external = isExternalHref(node.href);
42
+ return (
43
+ <li>
44
+ <a
45
+ href={siteHref(node.href)}
46
+ class="wd-nav-link-leaf"
47
+ target={external ? "_blank" : undefined}
48
+ rel={external ? "noopener noreferrer" : undefined}
49
+ >
50
+ <span>{node.label}</span>
51
+ {external && (
52
+ <svg class="wd-nav-external-icon" width="10" height="10" viewBox="0 0 10 10" aria-hidden="true">
53
+ <path
54
+ d="M3 1.5H8.5V7M8.5 1.5L1.5 8.5"
55
+ stroke="currentColor"
56
+ stroke-width="1.2"
57
+ fill="none"
58
+ stroke-linecap="round"
59
+ stroke-linejoin="round"
60
+ />
61
+ </svg>
62
+ )}
63
+ </a>
64
+ </li>
65
+ );
66
+ }
67
+
68
+ if (depth === 0) {
69
+ // Top-level group = a static sidebar section title, never a
70
+ // disclosure control - matches the reference design where the first
71
+ // group level is just a bold label above its pages.
72
+ return (
73
+ <li class="wd-nav-group">
74
+ <div class="wd-nav-section-title">
75
+ {node.pageSlug ? (
76
+ <a href={siteHref(hrefForSlug(node.pageSlug))} class={node.pageSlug === currentSlug ? "active" : ""}>
77
+ {node.label}
78
+ </a>
79
+ ) : (
80
+ node.label
81
+ )}
82
+ </div>
83
+ <Astro.self nodes={node.children} hrefForSlug={hrefForSlug} currentSlug={currentSlug} depth={depth + 1} />
84
+ </li>
85
+ );
86
+ }
87
+
88
+ // Depth >= 1: a nested group renders as a collapsible row, styled and
89
+ // inset exactly like a sibling page link, with a chevron on the
90
+ // right. Defaults open whenever the active page lives anywhere inside
91
+ // it (itself or a descendant), so landing on a child page never
92
+ // leaves its own parent collapsed.
93
+ const isActive = node.pageSlug === currentSlug;
94
+ const open = isActive || navTreeContainsSlug(node.children, currentSlug);
95
+ return (
96
+ <li class="wd-nav-collapsible">
97
+ <details open={open}>
98
+ <summary class={isActive ? "active" : ""}>
99
+ {node.pageSlug ? (
100
+ <a href={siteHref(hrefForSlug(node.pageSlug))} class={isActive ? "active" : ""}>
101
+ {node.label}
102
+ </a>
103
+ ) : (
104
+ <span class="wd-nav-group-label">{node.label}</span>
105
+ )}
106
+ <svg class="wd-nav-chevron" width="10" height="10" viewBox="0 0 10 10" aria-hidden="true">
107
+ <path
108
+ d="M3.5 2L6.5 5L3.5 8"
109
+ stroke="currentColor"
110
+ stroke-width="1.4"
111
+ fill="none"
112
+ stroke-linecap="round"
113
+ stroke-linejoin="round"
114
+ />
115
+ </svg>
116
+ </summary>
117
+ <Astro.self nodes={node.children} hrefForSlug={hrefForSlug} currentSlug={currentSlug} depth={depth + 1} />
118
+ </details>
119
+ </li>
120
+ );
121
+ })
122
+ }
123
+ </ul>
124
+
125
+ <style>
126
+ .wd-nav-list {
127
+ list-style: none;
128
+ margin: 0;
129
+ padding: 0;
130
+ }
131
+
132
+ .wd-nav-list li a,
133
+ .wd-nav-list li summary {
134
+ border-left: 1px solid transparent;
135
+ }
136
+
137
+ .wd-nav-list li a:not(summary a):hover,
138
+ .wd-nav-list li summary:hover {
139
+ border-left: 1px solid var(--wd-primary);
140
+ }
141
+
142
+ .wd-nav-list li a.active:not(summary a),
143
+ .wd-nav-list li summary.active {
144
+ border-left: 1px solid var(--wd-primary);
145
+ }
146
+
147
+ .wd-nav-depth-0 {
148
+ margin-bottom: 1.25rem;
149
+ }
150
+ /* Space between a top-level group and whatever sits next to it - another
151
+ group, or a page outside any group - so each group reads as its own
152
+ block. */
153
+ .wd-nav-depth-0 > .wd-nav-group + li,
154
+ .wd-nav-depth-0 > li + .wd-nav-group {
155
+ margin-top: 2rem;
156
+ }
157
+ .wd-nav-section-title {
158
+ padding: 0;
159
+ margin-bottom: 0.4rem;
160
+ color: var(--wd-nav-title);
161
+ font-size: 0.75rem;
162
+ font-weight: 600;
163
+ text-transform: uppercase;
164
+ letter-spacing: 0.04em;
165
+ }
166
+ /* Overrides `.wd-nav-list a`'s own block/padding/font-size/pill-when-
167
+ active styling further below - without this, a group-with-a-page's
168
+ title (e.g. "Concepts" linking to its own overview page) inherits
169
+ the same big rounded background pill a regular page row gets when
170
+ active, which looks completely out of place sitting next to a
171
+ plain-text sibling title like "Getting Started". A linked section
172
+ title should still read as a section title - same size/weight/
173
+ case/color as an unlinked one - just tinted primary on hover/active
174
+ instead. The extra `.wd-nav-group` ancestor qualifier (2 classes)
175
+ is load-bearing, not decoration: `.wd-nav-section-title a` alone
176
+ has the exact same specificity as `.wd-nav-list a` (1 class + 1
177
+ type each), so whichever rule happens to sit later in the
178
+ stylesheet would silently win regardless of intent - this avoids
179
+ that tie entirely. Mirrors the same "override to neutral, re-apply
180
+ only color" pattern already used for .wd-nav-collapsible summary a
181
+ below (which sidesteps the same tie via a `summary` type selector
182
+ instead). */
183
+ .wd-nav-group .wd-nav-section-title a {
184
+ display: inline;
185
+ padding: 0;
186
+ border-radius: 0;
187
+ background: none;
188
+ color: inherit;
189
+ font-size: inherit;
190
+ font-weight: inherit;
191
+ text-decoration: none;
192
+ }
193
+ .wd-nav-group .wd-nav-section-title a.active,
194
+ .wd-nav-group .wd-nav-section-title a:hover {
195
+ background: none;
196
+ color: var(--wd-primary);
197
+ }
198
+ .wd-nav-depth-1,
199
+ .wd-nav-depth-2,
200
+ .wd-nav-depth-3 {
201
+ margin-bottom: 0.5rem;
202
+ border-left: 1px solid var(--wd-border);
203
+ }
204
+
205
+ .wd-nav-depth-2,
206
+ .wd-nav-depth-3 {
207
+ margin-bottom: 0.5rem;
208
+ margin-left: 0.75rem;
209
+ border-left: 1px solid var(--wd-border);
210
+ }
211
+ .wd-nav-list a {
212
+ display: flex;
213
+ align-items: center;
214
+ gap: 0.45rem;
215
+ padding: 0.2rem 0.75rem;
216
+ margin: 0.1rem 0;
217
+ border-radius: 0 0.4rem 0.4rem 0;
218
+ text-decoration: none;
219
+ color: var(--wd-nav-text);
220
+ font-size: 0.9rem;
221
+ }
222
+ /* Primary-tinted rather than a neutral surface gray - a faint preview
223
+ of the active pill's own color (12% alpha), at half its strength, so
224
+ hover reads as "this could become active" instead of a generic
225
+ hover state shared with every other clickable thing on the page. */
226
+ .wd-nav-list a:hover {
227
+ background: color-mix(in srgb, var(--wd-primary) 6%, transparent);
228
+ color: var(--wd-nav-title);
229
+ }
230
+ .wd-nav-list a.active {
231
+ background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
232
+ color: var(--wd-primary);
233
+ font-weight: 500;
234
+ }
235
+ .wd-nav-title {
236
+ flex: 1;
237
+ min-width: 0;
238
+ overflow: hidden;
239
+ /* text-overflow: ellipsis;
240
+ white-space: nowrap; */
241
+ }
242
+ /* A page's own frontmatter `icon` (Mintlify's) - :global() because
243
+ AppIcon.astro renders the svg/span, not this component. */
244
+ :global(svg.wd-nav-page-icon),
245
+ :global(span.wd-nav-page-icon) {
246
+ flex-shrink: 0;
247
+ width: 1em;
248
+ height: 1em;
249
+ }
250
+ :global(span.wd-nav-page-icon) {
251
+ display: flex;
252
+ align-items: center;
253
+ justify-content: center;
254
+ }
255
+ /* Frontmatter `tag` / `deprecated` - a small pill after the title, same
256
+ shape as the method badge. */
257
+ .wd-nav-tag {
258
+ flex-shrink: 0;
259
+ padding: 0.05rem 0.4rem;
260
+ border-radius: 999px;
261
+ font-size: 0.62rem;
262
+ font-weight: 700;
263
+ line-height: 1.5;
264
+ letter-spacing: 0.02em;
265
+ color: var(--wd-primary);
266
+ background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
267
+ }
268
+ .wd-nav-tag-deprecated {
269
+ color: #d97706;
270
+ background: color-mix(in srgb, #d97706 15%, transparent);
271
+ }
272
+ .wd-nav-method {
273
+ flex-shrink: 0;
274
+ display: inline-block;
275
+ padding: 0.05rem 0.4rem;
276
+ border-radius: 0.3rem;
277
+ font-size: 0.62rem;
278
+ font-weight: 700;
279
+ letter-spacing: 0.02em;
280
+ line-height: 1.5;
281
+ }
282
+ .wd-nav-method-get {
283
+ background: color-mix(in srgb, #16a34a 15%, transparent);
284
+ color: #16a34a;
285
+ }
286
+ .wd-nav-method-post {
287
+ background: color-mix(in srgb, #2563eb 15%, transparent);
288
+ color: #2563eb;
289
+ }
290
+ .wd-nav-method-put {
291
+ background: color-mix(in srgb, #9333ea 15%, transparent);
292
+ color: #9333ea;
293
+ }
294
+ .wd-nav-method-patch {
295
+ background: color-mix(in srgb, #d97706 15%, transparent);
296
+ color: #d97706;
297
+ }
298
+ .wd-nav-method-delete {
299
+ background: color-mix(in srgb, #dc2626 15%, transparent);
300
+ color: #dc2626;
301
+ }
302
+ .wd-nav-method-other {
303
+ background: var(--wd-surface);
304
+ color: var(--wd-text-muted);
305
+ }
306
+ .wd-nav-link-leaf {
307
+ display: flex !important;
308
+ align-items: center;
309
+ justify-content: space-between;
310
+ gap: 0.5rem;
311
+ }
312
+ .wd-nav-external-icon {
313
+ flex-shrink: 0;
314
+ color: var(--wd-text-muted);
315
+ }
316
+
317
+ /* Depth >= 1 group: a collapsible row that looks like a page link. */
318
+ .wd-nav-collapsible details {
319
+ margin: 0;
320
+ }
321
+ .wd-nav-collapsible summary {
322
+ display: flex;
323
+ align-items: center;
324
+ justify-content: space-between;
325
+ gap: 0.5rem;
326
+ padding: 0.2rem 0.75rem;
327
+ margin: 0.1rem 0;
328
+ border-radius: 0 0.4rem 0.4rem 0;
329
+ cursor: pointer;
330
+ color: var(--wd-nav-text);
331
+ font-size: 0.9rem;
332
+ list-style: none;
333
+ }
334
+ .wd-nav-collapsible summary::-webkit-details-marker {
335
+ display: none;
336
+ }
337
+ .wd-nav-collapsible summary::marker {
338
+ content: "";
339
+ }
340
+ /* Same primary-tinted hover as a plain page link above. */
341
+ .wd-nav-collapsible summary:hover {
342
+ background: color-mix(in srgb, var(--wd-primary) 6%, transparent);
343
+ color: var(--wd-nav-title);
344
+ }
345
+ /* When the group's own attached page is the current page, the pill
346
+ background lives on <summary> itself (not the inner <a> below,
347
+ which is deliberately stripped of its own background/padding so the
348
+ chevron can share the row) - otherwise only the label text would be
349
+ highlighted, leaving the chevron sitting outside the pill. This is
350
+ the same background/radius a plain `.wd-nav-list a.active` pill
351
+ uses, so an active group header looks identical to an active leaf
352
+ page row instead of falling back to text-only bold+color. */
353
+ .wd-nav-collapsible summary.active {
354
+ background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
355
+ border-left: 1px solid var(--wd-primary);
356
+ }
357
+
358
+ .wd-nav-collapsible summary.active > a {
359
+ border-left: none;
360
+ }
361
+ /* Overrides `.wd-nav-list a`'s own block/padding - the row's padding is
362
+ owned by <summary> now, the label inside is just flex content. Wins
363
+ on specificity (class + 2 tags vs class + 1 tag) regardless of
364
+ source order. */
365
+ .wd-nav-collapsible summary a,
366
+ .wd-nav-collapsible summary .wd-nav-group-label {
367
+ display: block;
368
+ padding: 0;
369
+ border-radius: 0;
370
+ background: none;
371
+ color: inherit;
372
+ font-weight: inherit;
373
+ flex: 1;
374
+ min-width: 0;
375
+ }
376
+ .wd-nav-collapsible summary a:hover {
377
+ background: none;
378
+ color: var(--wd-nav-title);
379
+ }
380
+ .wd-nav-collapsible summary a.active {
381
+ background: none;
382
+ color: var(--wd-primary);
383
+ font-weight: 500;
384
+ }
385
+ .wd-nav-chevron {
386
+ flex-shrink: 0;
387
+ color: var(--wd-text-muted);
388
+ transition: transform 0.15s ease;
389
+ }
390
+ .wd-nav-collapsible details[open] > summary .wd-nav-chevron {
391
+ transform: rotate(90deg);
392
+ }
393
+ </style>