@ox-content/vite-plugin 2.90.0 → 3.0.0-alpha.10
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/dist/index.cjs +14800 -3855
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3680 -524
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3680 -524
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +15797 -4887
- package/dist/index.mjs.map +1 -1
- package/dist/styles/all.css +10 -0
- package/dist/styles/core.css +2169 -0
- package/dist/styles/github.css +256 -0
- package/dist/styles/magic-links.css +32 -0
- package/dist/styles/mermaid.css +151 -0
- package/dist/styles/not-by-ai.css +43 -0
- package/dist/styles/ogp.css +179 -0
- package/dist/styles/social.css +526 -0
- package/dist/styles/tabs.css +202 -0
- package/dist/styles/twitter-full.css +452 -0
- package/dist/styles/youtube.css +77 -0
- package/dist/vitepress.cjs +707 -15
- package/dist/vitepress.cjs.map +1 -1
- package/dist/vitepress.mjs +657 -15
- package/dist/vitepress.mjs.map +1 -1
- package/package.json +28 -9
- package/dist/interop.cjs +0 -31
- package/dist/interop.cjs.map +0 -1
- package/dist/interop.mjs +0 -26
- package/dist/interop.mjs.map +0 -1
- package/dist/tabs.cjs +0 -98
- package/dist/tabs.cjs.map +0 -1
- package/dist/tabs.mjs +0 -99
- package/dist/tabs.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,80 @@
|
|
|
1
1
|
import { a as JSXProps, c as jsxs, d as when, i as JSXNode, l as raw, n as JSXChild, o as each, r as JSXElementType, s as jsx, t as Fragment, u as renderToString } from "./jsx-html.mjs";
|
|
2
|
-
import { LanguageRegistration, LanguageRegistration as LanguageRegistration$1, ThemeRegistration, ThemeRegistration as ThemeRegistration$1 } from "shiki";
|
|
3
2
|
import { EnvironmentOptions, Plugin } from "vite";
|
|
3
|
+
//#region src/header-chrome.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Opt-in header nav, announcement, and per-page chrome helpers.
|
|
6
|
+
*/
|
|
7
|
+
/** Plain label or locale map (`{ en: "Guide", ja: "ガイド" }`). */
|
|
8
|
+
type LocaleLabel = string | Record<string, string>;
|
|
9
|
+
/** Header nav link or dropdown. */
|
|
10
|
+
interface HeaderNavItem {
|
|
11
|
+
text: LocaleLabel;
|
|
12
|
+
link?: string;
|
|
13
|
+
items?: HeaderNavItem[];
|
|
14
|
+
}
|
|
15
|
+
/** Announcement bar. Text is escaped; no raw HTML slot. */
|
|
16
|
+
interface ThemeAnnouncement {
|
|
17
|
+
text: string;
|
|
18
|
+
/** https or same-origin only. */
|
|
19
|
+
link?: string;
|
|
20
|
+
/** Best-effort localStorage key for dismiss. */
|
|
21
|
+
dismissKey?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Per-page frontmatter chrome flags. `false` hides that region. */
|
|
24
|
+
interface PageChromeFlags {
|
|
25
|
+
sidebar?: boolean;
|
|
26
|
+
outline?: boolean;
|
|
27
|
+
aside?: boolean;
|
|
28
|
+
footer?: boolean;
|
|
29
|
+
navbar?: boolean;
|
|
30
|
+
lastUpdated?: boolean;
|
|
31
|
+
editLink?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** `false` or omitted stays off. `true` or `{}` enables default flag reading. */
|
|
34
|
+
declare function resolvePageChromeOption(value: boolean | Record<string, unknown> | undefined): boolean;
|
|
35
|
+
/** Reads hide flags from frontmatter. Non-boolean values are ignored. */
|
|
36
|
+
declare function parsePageChromeFlags(frontmatter: Record<string, unknown>): PageChromeFlags;
|
|
37
|
+
/**
|
|
38
|
+
* Picks the exact locale, its language, the default locale, then the first
|
|
39
|
+
* non-empty own string in declaration order.
|
|
40
|
+
*/
|
|
41
|
+
declare function resolveLocaleLabel(text: LocaleLabel, locale?: string, defaultLocale?: string): string;
|
|
42
|
+
/** Nav item after locale maps are flattened to strings. */
|
|
43
|
+
interface ResolvedHeaderNavItem {
|
|
44
|
+
text: string;
|
|
45
|
+
link?: string;
|
|
46
|
+
items?: ResolvedHeaderNavItem[];
|
|
47
|
+
}
|
|
48
|
+
/** Resolves locale maps so NAPI always receives string labels. */
|
|
49
|
+
declare function resolveHeaderNavItems(items: HeaderNavItem[] | undefined, locale?: string, defaultLocale?: string): ResolvedHeaderNavItem[] | undefined;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/theme-fonts.d.ts
|
|
52
|
+
type ThemeFontProvider = "google" | "local";
|
|
53
|
+
type ThemeFontStyle = "normal" | "italic";
|
|
54
|
+
type ThemeFontDisplay = "auto" | "block" | "swap" | "fallback" | "optional";
|
|
55
|
+
/** UnoCSS-inspired family descriptor. The string stack form remains valid. */
|
|
56
|
+
interface ThemeWebFont {
|
|
57
|
+
/** Family name, e.g. `"Inter"` or `"DM Mono"`. */
|
|
58
|
+
family: string;
|
|
59
|
+
/** Defaults to `"local"` when `path` is set, otherwise `"google"`. */
|
|
60
|
+
provider?: ThemeFontProvider;
|
|
61
|
+
/** File, directory, or `@fontsource/*` package. Required for `local`. */
|
|
62
|
+
path?: string;
|
|
63
|
+
weights?: number[];
|
|
64
|
+
styles?: ThemeFontStyle[];
|
|
65
|
+
subsets?: string[];
|
|
66
|
+
display?: ThemeFontDisplay;
|
|
67
|
+
/** Copy files into the SSG output and emit `@font-face`. */
|
|
68
|
+
selfHost?: boolean;
|
|
69
|
+
/** Extra families after `family` in the emitted CSS stack. */
|
|
70
|
+
fallbacks?: string[];
|
|
71
|
+
/** Preload every self-hosted face, or only these weights. */
|
|
72
|
+
preload?: boolean | number[];
|
|
73
|
+
/** Optional `unicode-range` for local faces. */
|
|
74
|
+
unicodeRange?: string;
|
|
75
|
+
}
|
|
76
|
+
type ThemeFontValue = string | ThemeWebFont;
|
|
77
|
+
//#endregion
|
|
4
78
|
//#region src/theme-tokens.d.ts
|
|
5
79
|
/**
|
|
6
80
|
* Free-form `--octc-*` custom properties for themes that need more than the
|
|
@@ -53,12 +127,17 @@ interface ThemeLayout {
|
|
|
53
127
|
}
|
|
54
128
|
/**
|
|
55
129
|
* Theme font configuration.
|
|
130
|
+
*
|
|
131
|
+
* `sans` and `mono` accept a CSS stack string or a web-font object. Named
|
|
132
|
+
* families are extra stacks exposed as `--octc-font-<name>`.
|
|
56
133
|
*/
|
|
57
134
|
interface ThemeFonts {
|
|
58
|
-
/** Sans-serif font stack */
|
|
59
|
-
sans?:
|
|
60
|
-
/** Monospace font stack */
|
|
61
|
-
mono?:
|
|
135
|
+
/** Sans-serif font stack or self-hosted family */
|
|
136
|
+
sans?: ThemeFontValue;
|
|
137
|
+
/** Monospace font stack or self-hosted family */
|
|
138
|
+
mono?: ThemeFontValue;
|
|
139
|
+
/** Additional families, exposed as `--octc-font-<name>` */
|
|
140
|
+
named?: Record<string, ThemeFontValue>;
|
|
62
141
|
}
|
|
63
142
|
/**
|
|
64
143
|
* Entry page theme configuration.
|
|
@@ -137,8 +216,10 @@ interface ThemeEmbed {
|
|
|
137
216
|
/** Custom footer content (replaces default footer) */
|
|
138
217
|
footer?: string;
|
|
139
218
|
}
|
|
219
|
+
/** Sidebar group or link, including recursively nested localized labels. */
|
|
140
220
|
interface SidebarItem {
|
|
141
|
-
|
|
221
|
+
/** Plain label or locale map (`{ en: "Guide", ja: "ガイド" }`). */
|
|
222
|
+
text?: LocaleLabel;
|
|
142
223
|
link?: string;
|
|
143
224
|
items?: SidebarItem[];
|
|
144
225
|
collapsed?: boolean;
|
|
@@ -152,6 +233,38 @@ interface ThemeConfig {
|
|
|
152
233
|
name?: string;
|
|
153
234
|
/** Base theme to extend */
|
|
154
235
|
extends?: ThemeConfig;
|
|
236
|
+
/**
|
|
237
|
+
* Preserve the current surface during same-origin MPA navigation with the
|
|
238
|
+
* browser's cross-document View Transition API.
|
|
239
|
+
*
|
|
240
|
+
* Unsupported browsers use normal navigation. Reduced-motion preferences
|
|
241
|
+
* never enable the transition. Set `false` to opt out.
|
|
242
|
+
*
|
|
243
|
+
* @default true
|
|
244
|
+
*/
|
|
245
|
+
viewTransitions?: boolean;
|
|
246
|
+
/**
|
|
247
|
+
* Show the right-hand "On this page" outline.
|
|
248
|
+
*
|
|
249
|
+
* Default `false`. When `true`, the outline is rendered only on pages
|
|
250
|
+
* that have TOC entries, using the existing `<aside class="toc">` markup.
|
|
251
|
+
*/
|
|
252
|
+
aside?: boolean;
|
|
253
|
+
/**
|
|
254
|
+
* Show a breadcrumb trail from the site root through sidebar ancestors.
|
|
255
|
+
*
|
|
256
|
+
* Default `false`. `true` or an object enables the trail. Frontmatter
|
|
257
|
+
* `breadcrumbs: false` still hides it on that page.
|
|
258
|
+
*/
|
|
259
|
+
breadcrumbs?: boolean | Record<string, unknown>;
|
|
260
|
+
/**
|
|
261
|
+
* Heading permalink visibility. CSS only — the renderer HTML stays
|
|
262
|
+
* `<a class="header-anchor" href="#id">`.
|
|
263
|
+
*
|
|
264
|
+
* `"hover"` (default) reveals the `#` on hover / focus-visible, and
|
|
265
|
+
* stays visible on touch. `"always"` keeps it visible.
|
|
266
|
+
*/
|
|
267
|
+
headingPermalink?: "hover" | "always";
|
|
155
268
|
/** Light mode colors (maps to CSS variables) */
|
|
156
269
|
colors?: ThemeColors;
|
|
157
270
|
/** Dark mode colors (maps to CSS variables) */
|
|
@@ -164,6 +277,17 @@ interface ThemeConfig {
|
|
|
164
277
|
layout?: ThemeLayout;
|
|
165
278
|
/** Header configuration */
|
|
166
279
|
header?: ThemeHeader;
|
|
280
|
+
/**
|
|
281
|
+
* Opt-in header nav. Each item is `{ text, link }` or a dropdown
|
|
282
|
+
* `{ text, items }`. Labels are escaped. `javascript:`, `data:`,
|
|
283
|
+
* `vbscript:`, and protocol-relative `//` links are omitted.
|
|
284
|
+
*/
|
|
285
|
+
nav?: HeaderNavItem[];
|
|
286
|
+
/**
|
|
287
|
+
* Opt-in announcement bar above the header. Text is escaped.
|
|
288
|
+
* Optional `link` must be https or same-origin.
|
|
289
|
+
*/
|
|
290
|
+
announcement?: ThemeAnnouncement;
|
|
167
291
|
/** Footer configuration */
|
|
168
292
|
footer?: ThemeFooter;
|
|
169
293
|
/** Social links configuration */
|
|
@@ -192,12 +316,18 @@ interface ThemeConfig {
|
|
|
192
316
|
*/
|
|
193
317
|
interface ResolvedThemeConfig {
|
|
194
318
|
name: string;
|
|
319
|
+
viewTransitions: boolean;
|
|
320
|
+
aside: boolean;
|
|
321
|
+
breadcrumbs: boolean;
|
|
322
|
+
headingPermalink: "hover" | "always";
|
|
195
323
|
colors: ThemeColors;
|
|
196
324
|
darkColors: ThemeColors;
|
|
197
325
|
fonts: ThemeFonts;
|
|
198
326
|
entryPage: ThemeEntryPage;
|
|
199
327
|
layout: ThemeLayout;
|
|
200
328
|
header: ThemeHeader;
|
|
329
|
+
nav?: HeaderNavItem[];
|
|
330
|
+
announcement?: ThemeAnnouncement;
|
|
201
331
|
footer: ThemeFooter;
|
|
202
332
|
socialLinks: SocialLinks;
|
|
203
333
|
sidebar: SidebarItem[];
|
|
@@ -257,6 +387,181 @@ declare function mergeThemes(...themes: (ThemeConfig | ThemeConfig[])[]): ThemeC
|
|
|
257
387
|
*/
|
|
258
388
|
declare function resolveTheme(config?: ThemeConfig | ThemeConfig[]): ResolvedThemeConfig;
|
|
259
389
|
//#endregion
|
|
390
|
+
//#region src/plugins/tabs.d.ts
|
|
391
|
+
/**
|
|
392
|
+
* Transform Tabs components in HTML.
|
|
393
|
+
*/
|
|
394
|
+
declare function transformTabs(html: string): Promise<string>;
|
|
395
|
+
/**
|
|
396
|
+
* Generate dynamic CSS for :has() based tab switching.
|
|
397
|
+
* This is needed because :has() selectors need unique IDs.
|
|
398
|
+
*/
|
|
399
|
+
declare function generateTabsCSS(groupCount: number): string;
|
|
400
|
+
//#endregion
|
|
401
|
+
//#region src/plugins/pm.d.ts
|
|
402
|
+
/**
|
|
403
|
+
* Package Manager Tabs Plugin
|
|
404
|
+
*
|
|
405
|
+
* Transforms <pm>npm install …</pm> blocks into a tab group with one tab per
|
|
406
|
+
* package manager (npm/pnpm/yarn/bun). The single npm-style command is converted
|
|
407
|
+
* to each package manager's equivalent natively in Rust (`transformPmEmbeds` in
|
|
408
|
+
* @ox-content/napi), and the result reuses the same `ox-tabs` widget markup as
|
|
409
|
+
* the generic `<tabs>` plugin so styling and keyboard navigation are consistent.
|
|
410
|
+
*
|
|
411
|
+
* Syncing is opt-in (off by default): when enabled, the rendered group carries a
|
|
412
|
+
* `data-ox-tab-group="pkg-manager"` attribute so the client runtime can keep
|
|
413
|
+
* every package-manager group on the page in sync via localStorage.
|
|
414
|
+
*
|
|
415
|
+
* Package-manager groups share the tab-group counter with the `<tabs>` plugin so
|
|
416
|
+
* `data-group` ids (and the CSS produced by `generateTabsCSS`) stay unique.
|
|
417
|
+
*/
|
|
418
|
+
/** Options for {@link transformPm}. */
|
|
419
|
+
interface PmOptions {
|
|
420
|
+
/**
|
|
421
|
+
* Enable opt-in synced package-manager tab groups. When `true`, a
|
|
422
|
+
* `data-ox-tab-group="pkg-manager"` attribute is emitted so the client runtime
|
|
423
|
+
* syncs the active package manager across every pm group on the page and
|
|
424
|
+
* persists the choice in localStorage.
|
|
425
|
+
* @default false
|
|
426
|
+
*/
|
|
427
|
+
sync?: boolean;
|
|
428
|
+
}
|
|
429
|
+
//#endregion
|
|
430
|
+
//#region src/plugins/youtube.d.ts
|
|
431
|
+
/**
|
|
432
|
+
* YouTube Plugin - Privacy-enhanced iframe embedding
|
|
433
|
+
*
|
|
434
|
+
* Transforms <YouTube> components into responsive iframe embeds using
|
|
435
|
+
* youtube-nocookie.com for enhanced privacy. A digits-only `start` attribute
|
|
436
|
+
* becomes `?start=` on the iframe URL.
|
|
437
|
+
*
|
|
438
|
+
* The HTML rewrite is performed in Rust (`transformYoutubeEmbeds` in
|
|
439
|
+
* @ox-content/napi), replacing the previous rehype parse/stringify
|
|
440
|
+
* round-trip. This module keeps the public TS surface and a cheap marker
|
|
441
|
+
* check so pages without a `<youtube>` element never cross the NAPI boundary.
|
|
442
|
+
*/
|
|
443
|
+
interface YouTubeOptions {
|
|
444
|
+
/**
|
|
445
|
+
* Use privacy-enhanced mode (`youtube-nocookie.com`).
|
|
446
|
+
* @default true
|
|
447
|
+
*/
|
|
448
|
+
privacyEnhanced?: boolean;
|
|
449
|
+
/**
|
|
450
|
+
* Default iframe aspect ratio.
|
|
451
|
+
* @default '16/9'
|
|
452
|
+
*/
|
|
453
|
+
aspectRatio?: string;
|
|
454
|
+
/**
|
|
455
|
+
* Allow fullscreen playback.
|
|
456
|
+
* @default true
|
|
457
|
+
*/
|
|
458
|
+
allowFullscreen?: boolean;
|
|
459
|
+
/**
|
|
460
|
+
* Lazy load the iframe.
|
|
461
|
+
* @default true
|
|
462
|
+
*/
|
|
463
|
+
lazyLoad?: boolean;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Extract YouTube video ID from various URL formats.
|
|
467
|
+
*/
|
|
468
|
+
declare function extractVideoId(input: string): string | null;
|
|
469
|
+
/**
|
|
470
|
+
* Transform YouTube components in HTML.
|
|
471
|
+
*/
|
|
472
|
+
declare function transformYouTube(html: string, options?: YouTubeOptions): Promise<string>;
|
|
473
|
+
//#endregion
|
|
474
|
+
//#region src/plugins/reddit/types.d.ts
|
|
475
|
+
interface RedditEmbedOptions {
|
|
476
|
+
/**
|
|
477
|
+
* Fetch Reddit post metadata at build time.
|
|
478
|
+
* @default true
|
|
479
|
+
*/
|
|
480
|
+
fetch?: boolean;
|
|
481
|
+
/**
|
|
482
|
+
* Metadata request timeout in milliseconds.
|
|
483
|
+
* @default 10000
|
|
484
|
+
*/
|
|
485
|
+
timeout?: number;
|
|
486
|
+
/**
|
|
487
|
+
* Cache fetched post metadata in memory for the current process.
|
|
488
|
+
* @default true
|
|
489
|
+
*/
|
|
490
|
+
cache?: boolean;
|
|
491
|
+
/**
|
|
492
|
+
* Cache TTL in milliseconds. Fresh memory entries skip the network.
|
|
493
|
+
* @default 3600000
|
|
494
|
+
*/
|
|
495
|
+
cacheTTL?: number;
|
|
496
|
+
/**
|
|
497
|
+
* User agent sent to Reddit's JSON endpoint.
|
|
498
|
+
* @default 'ox-content-reddit-bot/1.0 (compatible; +https://github.com/ubugeeei-prod/ox-content)'
|
|
499
|
+
*/
|
|
500
|
+
userAgent?: string;
|
|
501
|
+
}
|
|
502
|
+
interface RedditPostReference {
|
|
503
|
+
url: string;
|
|
504
|
+
id?: string;
|
|
505
|
+
subreddit?: string;
|
|
506
|
+
slug?: string;
|
|
507
|
+
shareId?: string;
|
|
508
|
+
apiUrl?: string;
|
|
509
|
+
}
|
|
510
|
+
interface RedditPostImage {
|
|
511
|
+
url: string;
|
|
512
|
+
width?: number;
|
|
513
|
+
height?: number;
|
|
514
|
+
}
|
|
515
|
+
interface RedditPostData {
|
|
516
|
+
permalink: string;
|
|
517
|
+
subreddit: string;
|
|
518
|
+
title: string;
|
|
519
|
+
author?: string;
|
|
520
|
+
body?: string;
|
|
521
|
+
score?: number;
|
|
522
|
+
commentCount?: number;
|
|
523
|
+
createdAt?: string;
|
|
524
|
+
originalUrl?: string;
|
|
525
|
+
image?: RedditPostImage;
|
|
526
|
+
}
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region src/plugins/reddit/transform.d.ts
|
|
529
|
+
declare function transformRedditEmbeds(html: string, options?: RedditEmbedOptions): Promise<string>;
|
|
530
|
+
//#endregion
|
|
531
|
+
//#region src/plugins/reddit/url.d.ts
|
|
532
|
+
declare function parseRedditPostReference(value: string): RedditPostReference | null;
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region src/plugins/twitter/types.d.ts
|
|
535
|
+
interface TwitterEmbedOptions {
|
|
536
|
+
/** Fetch the post body, author, and media from X at build time. */
|
|
537
|
+
fetch?: boolean;
|
|
538
|
+
/** Language sent to the syndication endpoint. @default "en" */
|
|
539
|
+
lang?: string;
|
|
540
|
+
/** Request timeout in milliseconds. @default 10000 */
|
|
541
|
+
timeout?: number;
|
|
542
|
+
/** Cache syndication responses in memory and on disk. @default true */
|
|
543
|
+
cache?: boolean;
|
|
544
|
+
/** Directory used for the persistent metadata cache. @default ".cache/ox-content/twitter" */
|
|
545
|
+
cacheDir?: string;
|
|
546
|
+
/** Directory where avatars, photos, and videos are written. @default "public/ox-content/twitter" */
|
|
547
|
+
mediaOutputDir?: string;
|
|
548
|
+
/** Public URL prefix for downloaded media. @default "/ox-content/twitter" */
|
|
549
|
+
mediaPublicPath?: string;
|
|
550
|
+
/** Download MP4 video and animated GIF assets at build time. @default false */
|
|
551
|
+
downloadVideo?: boolean;
|
|
552
|
+
/** Maximum video size in bytes. Oversized assets are skipped. @default 8388608 */
|
|
553
|
+
maxVideoBytes?: number;
|
|
554
|
+
/** Fetched-card chrome. `"full"` matches sveltweet / react-tweet. @default "compact" */
|
|
555
|
+
appearance?: TweetAppearance;
|
|
556
|
+
/**
|
|
557
|
+
* IANA timezone for full-card timestamps.
|
|
558
|
+
* Invalid values fall back to UTC so build output stays deterministic.
|
|
559
|
+
* @default "UTC"
|
|
560
|
+
*/
|
|
561
|
+
timeZone?: string;
|
|
562
|
+
}
|
|
563
|
+
type TweetAppearance = "compact" | "full";
|
|
564
|
+
//#endregion
|
|
260
565
|
//#region src/plugins/github/types.d.ts
|
|
261
566
|
interface GitHubRepoData {
|
|
262
567
|
name: string;
|
|
@@ -282,6 +587,11 @@ interface GitHubSourceRef {
|
|
|
282
587
|
permalink: string;
|
|
283
588
|
lines?: GitHubLineRange;
|
|
284
589
|
}
|
|
590
|
+
interface GitHubSourceCommit {
|
|
591
|
+
sha: string;
|
|
592
|
+
message: string;
|
|
593
|
+
html_url: string;
|
|
594
|
+
}
|
|
285
595
|
interface GitHubSourceData {
|
|
286
596
|
repo: string;
|
|
287
597
|
ref: string;
|
|
@@ -291,6 +601,7 @@ interface GitHubSourceData {
|
|
|
291
601
|
size: number;
|
|
292
602
|
html_url: string;
|
|
293
603
|
language: string | null;
|
|
604
|
+
commit?: GitHubSourceCommit;
|
|
294
605
|
}
|
|
295
606
|
interface GitHubOptions {
|
|
296
607
|
/**
|
|
@@ -358,31 +669,7 @@ declare function parseGitHubPermalink(value: string): GitHubSourceRef | null;
|
|
|
358
669
|
*/
|
|
359
670
|
declare function transformGitHub(html: string, repoDataMap?: Map<string, GitHubRepoData | null>, options?: GitHubOptions): Promise<string>;
|
|
360
671
|
//#endregion
|
|
361
|
-
//#region src/plugins/
|
|
362
|
-
interface TwitterEmbedOptions {
|
|
363
|
-
/** Fetch the post body, author, and media from X at build time. */
|
|
364
|
-
fetch?: boolean;
|
|
365
|
-
/** Language sent to the syndication endpoint. @default "en" */
|
|
366
|
-
lang?: string;
|
|
367
|
-
/** Request timeout in milliseconds. @default 10000 */
|
|
368
|
-
timeout?: number;
|
|
369
|
-
/** Cache syndication responses in memory and on disk. @default true */
|
|
370
|
-
cache?: boolean;
|
|
371
|
-
/** Directory used for the persistent metadata cache. @default ".cache/ox-content/twitter" */
|
|
372
|
-
cacheDir?: string;
|
|
373
|
-
/** Directory where avatars and photos are written. @default "public/ox-content/twitter" */
|
|
374
|
-
mediaOutputDir?: string;
|
|
375
|
-
/** Public URL prefix for downloaded media. @default "/ox-content/twitter" */
|
|
376
|
-
mediaPublicPath?: string;
|
|
377
|
-
}
|
|
378
|
-
//#endregion
|
|
379
|
-
//#region src/plugins/ogp.d.ts
|
|
380
|
-
/**
|
|
381
|
-
* OGP Card Plugin - Link card embedding
|
|
382
|
-
*
|
|
383
|
-
* Transforms <OgCard> components into static link preview cards
|
|
384
|
-
* by fetching OGP metadata at build time.
|
|
385
|
-
*/
|
|
672
|
+
//#region src/plugins/ogp/types.d.ts
|
|
386
673
|
interface OgpData {
|
|
387
674
|
url: string;
|
|
388
675
|
title: string;
|
|
@@ -399,142 +686,68 @@ interface OgpOptions {
|
|
|
399
686
|
timeout?: number;
|
|
400
687
|
/**
|
|
401
688
|
* Cache fetched Open Graph metadata in memory for the current process.
|
|
689
|
+
* Persistent disk cache also requires this to be enabled.
|
|
402
690
|
* @default true
|
|
403
691
|
*/
|
|
404
692
|
cache?: boolean;
|
|
405
693
|
/**
|
|
406
|
-
* Cache TTL in milliseconds.
|
|
694
|
+
* Cache TTL in milliseconds. Fresh memory and disk entries skip the network.
|
|
407
695
|
* @default 3600000
|
|
408
696
|
*/
|
|
409
697
|
cacheTTL?: number;
|
|
698
|
+
/**
|
|
699
|
+
* Persist successful and negative cache entries to disk across builds.
|
|
700
|
+
* Off by default so existing sites do not write a cache directory.
|
|
701
|
+
* @default false
|
|
702
|
+
*/
|
|
703
|
+
persistCache?: boolean;
|
|
704
|
+
/**
|
|
705
|
+
* Directory used for the persistent metadata cache when `persistCache` is on.
|
|
706
|
+
* @default ".cache/ox-content/ogp"
|
|
707
|
+
*/
|
|
708
|
+
cacheDir?: string;
|
|
709
|
+
/**
|
|
710
|
+
* Re-fetch metadata even when a fresh cache entry exists.
|
|
711
|
+
* @default false
|
|
712
|
+
*/
|
|
713
|
+
refresh?: boolean;
|
|
410
714
|
/**
|
|
411
715
|
* User agent sent with metadata fetch requests.
|
|
412
716
|
* @default 'ox-content-ogp-bot/1.0 (compatible; +https://github.com/ubugeeei-prod/ox-content)'
|
|
413
717
|
*/
|
|
414
718
|
userAgent?: string;
|
|
415
719
|
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
* Collect all OGP URLs from HTML for pre-fetching.
|
|
422
|
-
*/
|
|
720
|
+
//#endregion
|
|
721
|
+
//#region src/plugins/ogp/fetch.d.ts
|
|
722
|
+
declare function fetchOgpData(url: string, options?: OgpOptions): Promise<OgpData | null>;
|
|
723
|
+
//#endregion
|
|
724
|
+
//#region src/plugins/ogp/transform.d.ts
|
|
423
725
|
declare function collectOgpUrls(html: string): Promise<string[]>;
|
|
424
|
-
/**
|
|
425
|
-
* Pre-fetch all OGP data.
|
|
426
|
-
*/
|
|
427
726
|
declare function prefetchOgpData(urls: string[], options?: OgpOptions): Promise<Map<string, OgpData | null>>;
|
|
428
|
-
/**
|
|
429
|
-
* Transform OgCard components in HTML.
|
|
430
|
-
*/
|
|
431
727
|
declare function transformOgp(html: string, ogpDataMap?: Map<string, OgpData | null>, options?: OgpOptions): Promise<string>;
|
|
432
728
|
//#endregion
|
|
433
|
-
//#region src/plugins/
|
|
729
|
+
//#region src/plugins/mermaid.d.ts
|
|
434
730
|
/**
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
* Transforms <pm>npm install …</pm> blocks into a tab group with one tab per
|
|
438
|
-
* package manager (npm/pnpm/yarn/bun). The single npm-style command is converted
|
|
439
|
-
* to each package manager's equivalent natively in Rust (`transformPmEmbeds` in
|
|
440
|
-
* @ox-content/napi), and the result reuses the same `ox-tabs` widget markup as
|
|
441
|
-
* the generic `<tabs>` plugin so styling and keyboard navigation are consistent.
|
|
442
|
-
*
|
|
443
|
-
* Syncing is opt-in (off by default): when enabled, the rendered group carries a
|
|
444
|
-
* `data-ox-tab-group="pkg-manager"` attribute so the client runtime can keep
|
|
445
|
-
* every package-manager group on the page in sync via localStorage.
|
|
731
|
+
* Mermaid Plugin - Native Rust renderer via NAPI
|
|
446
732
|
*
|
|
447
|
-
*
|
|
448
|
-
*
|
|
733
|
+
* Renders mermaid code blocks to SVG using the native Rust renderer
|
|
734
|
+
* via NAPI. Delegates to the NAPI `transformMermaid` function which
|
|
735
|
+
* extracts mermaid code blocks from HTML and renders them using mmdc.
|
|
449
736
|
*/
|
|
450
|
-
|
|
451
|
-
interface PmOptions {
|
|
737
|
+
interface MermaidOptions {
|
|
452
738
|
/**
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
* syncs the active package manager across every pm group on the page and
|
|
456
|
-
* persists the choice in localStorage.
|
|
457
|
-
* @default false
|
|
739
|
+
* Mermaid theme used by the CLI renderer.
|
|
740
|
+
* @default 'neutral'
|
|
458
741
|
*/
|
|
459
|
-
|
|
742
|
+
theme?: "default" | "dark" | "forest" | "neutral" | "base";
|
|
460
743
|
}
|
|
461
|
-
//#endregion
|
|
462
|
-
//#region src/plugins/tabs.d.ts
|
|
463
744
|
/**
|
|
464
|
-
*
|
|
745
|
+
* Transforms mermaid code blocks in HTML to rendered SVG diagrams.
|
|
746
|
+
* Uses the native Rust NAPI transformMermaid function.
|
|
465
747
|
*/
|
|
466
|
-
declare function
|
|
748
|
+
declare function transformMermaidStatic(html: string, _options?: MermaidOptions): Promise<string>;
|
|
467
749
|
/**
|
|
468
|
-
*
|
|
469
|
-
* This is needed because :has() selectors need unique IDs.
|
|
470
|
-
*/
|
|
471
|
-
declare function generateTabsCSS(groupCount: number): string;
|
|
472
|
-
//#endregion
|
|
473
|
-
//#region src/plugins/youtube.d.ts
|
|
474
|
-
/**
|
|
475
|
-
* YouTube Plugin - Privacy-enhanced iframe embedding
|
|
476
|
-
*
|
|
477
|
-
* Transforms <YouTube> components into responsive iframe embeds using
|
|
478
|
-
* youtube-nocookie.com for enhanced privacy.
|
|
479
|
-
*
|
|
480
|
-
* The HTML rewrite is performed in Rust (`transformYoutubeEmbeds` in
|
|
481
|
-
* @ox-content/napi), replacing the previous rehype parse/stringify
|
|
482
|
-
* round-trip. This module keeps the public TS surface and a cheap marker
|
|
483
|
-
* check so pages without a `<youtube>` element never cross the NAPI boundary.
|
|
484
|
-
*/
|
|
485
|
-
interface YouTubeOptions {
|
|
486
|
-
/**
|
|
487
|
-
* Use privacy-enhanced mode (`youtube-nocookie.com`).
|
|
488
|
-
* @default true
|
|
489
|
-
*/
|
|
490
|
-
privacyEnhanced?: boolean;
|
|
491
|
-
/**
|
|
492
|
-
* Default iframe aspect ratio.
|
|
493
|
-
* @default '16/9'
|
|
494
|
-
*/
|
|
495
|
-
aspectRatio?: string;
|
|
496
|
-
/**
|
|
497
|
-
* Allow fullscreen playback.
|
|
498
|
-
* @default true
|
|
499
|
-
*/
|
|
500
|
-
allowFullscreen?: boolean;
|
|
501
|
-
/**
|
|
502
|
-
* Lazy load the iframe.
|
|
503
|
-
* @default true
|
|
504
|
-
*/
|
|
505
|
-
lazyLoad?: boolean;
|
|
506
|
-
}
|
|
507
|
-
/**
|
|
508
|
-
* Extract YouTube video ID from various URL formats.
|
|
509
|
-
*/
|
|
510
|
-
declare function extractVideoId(input: string): string | null;
|
|
511
|
-
/**
|
|
512
|
-
* Transform YouTube components in HTML.
|
|
513
|
-
*/
|
|
514
|
-
declare function transformYouTube(html: string, options?: YouTubeOptions): Promise<string>;
|
|
515
|
-
//#endregion
|
|
516
|
-
//#region src/plugins/mermaid.d.ts
|
|
517
|
-
/**
|
|
518
|
-
* Mermaid Plugin - Native Rust renderer via NAPI
|
|
519
|
-
*
|
|
520
|
-
* Renders mermaid code blocks to SVG using the native Rust renderer
|
|
521
|
-
* via NAPI. Delegates to the NAPI `transformMermaid` function which
|
|
522
|
-
* extracts mermaid code blocks from HTML and renders them using mmdc.
|
|
523
|
-
*/
|
|
524
|
-
interface MermaidOptions {
|
|
525
|
-
/**
|
|
526
|
-
* Mermaid theme used by the CLI renderer.
|
|
527
|
-
* @default 'neutral'
|
|
528
|
-
*/
|
|
529
|
-
theme?: "default" | "dark" | "forest" | "neutral" | "base";
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* Transforms mermaid code blocks in HTML to rendered SVG diagrams.
|
|
533
|
-
* Uses the native Rust NAPI transformMermaid function.
|
|
534
|
-
*/
|
|
535
|
-
declare function transformMermaidStatic(html: string, _options?: MermaidOptions): Promise<string>;
|
|
536
|
-
/**
|
|
537
|
-
* @deprecated No longer used. Mermaid rendering is now done at build time via NAPI.
|
|
750
|
+
* @deprecated No longer used. Mermaid rendering is now done at build time via NAPI.
|
|
538
751
|
*/
|
|
539
752
|
declare const mermaidClientScript = "";
|
|
540
753
|
//#endregion
|
|
@@ -558,8 +771,13 @@ interface TransformAllOptions {
|
|
|
558
771
|
mermaid?: boolean;
|
|
559
772
|
githubToken?: string;
|
|
560
773
|
spotify?: boolean;
|
|
774
|
+
appleMusic?: boolean;
|
|
775
|
+
speakerDeck?: boolean;
|
|
776
|
+
audio?: boolean;
|
|
777
|
+
video?: boolean;
|
|
561
778
|
stackBlitz?: boolean;
|
|
562
779
|
twitter?: boolean | TwitterEmbedOptions;
|
|
780
|
+
reddit?: boolean | RedditEmbedOptions;
|
|
563
781
|
bluesky?: boolean;
|
|
564
782
|
webContainer?: boolean;
|
|
565
783
|
}
|
|
@@ -583,10 +801,17 @@ interface BasePageProps {
|
|
|
583
801
|
toc: TocEntry[];
|
|
584
802
|
/** Last git commit timestamp in milliseconds */
|
|
585
803
|
lastUpdated?: number;
|
|
804
|
+
/** Unique git authors for this page */
|
|
805
|
+
contributors?: Array<{
|
|
806
|
+
name: string;
|
|
807
|
+
avatar?: string;
|
|
808
|
+
}>;
|
|
586
809
|
/** Source file path (relative to docs root) */
|
|
587
810
|
path: string;
|
|
588
811
|
/** Output URL path */
|
|
589
812
|
url: string;
|
|
813
|
+
/** Published Markdown companion URL when `ssg.markdownSource` is on */
|
|
814
|
+
markdownSource?: string;
|
|
590
815
|
/** Raw frontmatter object */
|
|
591
816
|
frontmatter: Record<string, unknown>;
|
|
592
817
|
/** Layout name from frontmatter */
|
|
@@ -783,10 +1008,17 @@ interface PageData {
|
|
|
783
1008
|
toc: TocEntry[];
|
|
784
1009
|
/** Last git commit timestamp in milliseconds */
|
|
785
1010
|
lastUpdated?: number;
|
|
1011
|
+
/** Unique git authors for this page */
|
|
1012
|
+
contributors?: Array<{
|
|
1013
|
+
name: string;
|
|
1014
|
+
avatar?: string;
|
|
1015
|
+
}>;
|
|
786
1016
|
/** Source file path */
|
|
787
1017
|
path: string;
|
|
788
1018
|
/** Output URL path */
|
|
789
1019
|
url: string;
|
|
1020
|
+
/** Published Markdown companion URL when `ssg.markdownSource` is on */
|
|
1021
|
+
markdownSource?: string;
|
|
790
1022
|
/** Frontmatter */
|
|
791
1023
|
frontmatter: Record<string, unknown>;
|
|
792
1024
|
/** Layout name */
|
|
@@ -993,6 +1225,21 @@ interface SsgOptions {
|
|
|
993
1225
|
* @default '.html'
|
|
994
1226
|
*/
|
|
995
1227
|
extension?: string;
|
|
1228
|
+
/**
|
|
1229
|
+
* Mount generated page routes under this path, independent from `base` and
|
|
1230
|
+
* `outDir`.
|
|
1231
|
+
*
|
|
1232
|
+
* `blog`, `/blog`, and `/blog/` all mount under `/blog`. Page HTML and
|
|
1233
|
+
* page-level assets follow the prefix. Root host files (`_redirects`,
|
|
1234
|
+
* `_headers`, root feeds, sitemap index) stay at `outDir`. `base` remains
|
|
1235
|
+
* the public deployment prefix and is not used as an output mount.
|
|
1236
|
+
* Frontmatter `permalink` still wins when permalinks are enabled.
|
|
1237
|
+
*
|
|
1238
|
+
* Off when omitted.
|
|
1239
|
+
*
|
|
1240
|
+
* @default undefined
|
|
1241
|
+
*/
|
|
1242
|
+
routePrefix?: string;
|
|
996
1243
|
/**
|
|
997
1244
|
* Remove previously generated files from the output directory before writing
|
|
998
1245
|
* the new SSG result.
|
|
@@ -1098,6 +1345,153 @@ interface SsgOptions {
|
|
|
1098
1345
|
* @default false
|
|
1099
1346
|
*/
|
|
1100
1347
|
lastUpdated?: boolean;
|
|
1348
|
+
/**
|
|
1349
|
+
* List unique git authors for each page.
|
|
1350
|
+
*
|
|
1351
|
+
* Off by default. `true` enables names only. An object enables the
|
|
1352
|
+
* feature and can set `ignore` and `avatars`. Missing `.git` (for
|
|
1353
|
+
* example a published tarball) yields an empty list and does not
|
|
1354
|
+
* fail the build.
|
|
1355
|
+
*
|
|
1356
|
+
* @default false
|
|
1357
|
+
*/
|
|
1358
|
+
contributors?: boolean | ContributorsOptions;
|
|
1359
|
+
/**
|
|
1360
|
+
* Show previous/next page links after the article.
|
|
1361
|
+
*
|
|
1362
|
+
* Disabled when omitted or `false`. `true` enables the default pager.
|
|
1363
|
+
* An object also enables the feature.
|
|
1364
|
+
*
|
|
1365
|
+
* @default false
|
|
1366
|
+
*/
|
|
1367
|
+
pagination?: boolean | Record<string, unknown>;
|
|
1368
|
+
/**
|
|
1369
|
+
* Show a breadcrumb trail from the site root through sidebar ancestors.
|
|
1370
|
+
*
|
|
1371
|
+
* Disabled when omitted or `false`. `true` enables the default trail.
|
|
1372
|
+
* An object also enables the feature. Frontmatter `breadcrumbs: false`
|
|
1373
|
+
* hides the trail on that page.
|
|
1374
|
+
*
|
|
1375
|
+
* @default false
|
|
1376
|
+
*/
|
|
1377
|
+
breadcrumbs?: boolean | Record<string, unknown>;
|
|
1378
|
+
/**
|
|
1379
|
+
* Emit JSON-LD structured data (`TechArticle`, `WebSite`, and optional
|
|
1380
|
+
* `BreadcrumbList`) in the page `<head>`.
|
|
1381
|
+
*
|
|
1382
|
+
* Disabled when omitted or `false`. `true` enables the defaults. An object
|
|
1383
|
+
* enables the feature and can hide BreadcrumbList or supply a publisher.
|
|
1384
|
+
* Publisher fields the site does not set are not invented.
|
|
1385
|
+
*
|
|
1386
|
+
* @default false
|
|
1387
|
+
*/
|
|
1388
|
+
jsonLd?: boolean | JsonLdOptions;
|
|
1389
|
+
/**
|
|
1390
|
+
* Validate custom page-head descriptors during SSG.
|
|
1391
|
+
*
|
|
1392
|
+
* `false` / omitted drops invalid values silently. `warn` logs them.
|
|
1393
|
+
* `strict` fails the build on unsafe URLs or invalid hreflang.
|
|
1394
|
+
*
|
|
1395
|
+
* @default false
|
|
1396
|
+
*/
|
|
1397
|
+
headValidation?: false | "warn" | "strict";
|
|
1398
|
+
/**
|
|
1399
|
+
* Opt-in copy buttons, outbound-link icons, and a back-to-top control.
|
|
1400
|
+
*
|
|
1401
|
+
* Disabled when omitted or `false`. `true` enables all three with defaults.
|
|
1402
|
+
* An object enables the feature and can turn one control off, for example
|
|
1403
|
+
* `{ copy: false }`.
|
|
1404
|
+
*
|
|
1405
|
+
* @default false
|
|
1406
|
+
*/
|
|
1407
|
+
readerChrome?: boolean | ReaderChromeOptions;
|
|
1408
|
+
/**
|
|
1409
|
+
* Show a header locale switcher in the default theme.
|
|
1410
|
+
*
|
|
1411
|
+
* Disabled when omitted or `false`, even if `i18n.locales` is set.
|
|
1412
|
+
* `true` or an object enables the control when available locales are
|
|
1413
|
+
* non-empty. Links use the sibling page when it exists, otherwise the
|
|
1414
|
+
* locale root (`/{locale}/` or a configured root).
|
|
1415
|
+
*
|
|
1416
|
+
* @default false
|
|
1417
|
+
*/
|
|
1418
|
+
localeSwitcher?: boolean | Record<string, unknown>;
|
|
1419
|
+
/**
|
|
1420
|
+
* Opt-in skip link and print styles.
|
|
1421
|
+
*
|
|
1422
|
+
* Disabled when omitted or `false`. `true` enables the default skip link
|
|
1423
|
+
* and print CSS. An object enables the feature and can override the label.
|
|
1424
|
+
*
|
|
1425
|
+
* @default false
|
|
1426
|
+
*/
|
|
1427
|
+
a11y?: boolean | A11yOptions;
|
|
1428
|
+
/**
|
|
1429
|
+
* Honor per-page frontmatter chrome flags (`sidebar`, `outline` / `aside`,
|
|
1430
|
+
* `footer`, `navbar`, `lastUpdated`, `editLink`).
|
|
1431
|
+
*
|
|
1432
|
+
* Disabled when omitted or `false`. `true` or `{}` enables the defaults:
|
|
1433
|
+
* omitted flags keep current chrome, and `false` hides that region.
|
|
1434
|
+
*
|
|
1435
|
+
* @default false
|
|
1436
|
+
*/
|
|
1437
|
+
pageChrome?: boolean | Record<string, unknown>;
|
|
1438
|
+
/**
|
|
1439
|
+
* Publish the original Markdown beside each generated HTML page.
|
|
1440
|
+
*
|
|
1441
|
+
* Off by default. `true` writes a `.md` companion using the published URL
|
|
1442
|
+
* (permalink, locale, base, and output directory) and adds
|
|
1443
|
+
* `<link rel="alternate" type="text/markdown">`. An object enables the
|
|
1444
|
+
* feature and can turn the alternate link off, or opt in to the default
|
|
1445
|
+
* theme's Copy as Markdown control.
|
|
1446
|
+
*
|
|
1447
|
+
* The companion is a byte-for-byte copy of the source file, including
|
|
1448
|
+
* frontmatter. Draft and unlisted pages are never written.
|
|
1449
|
+
*
|
|
1450
|
+
* @default false
|
|
1451
|
+
*/
|
|
1452
|
+
markdownSource?: boolean | MarkdownSourceOptions;
|
|
1453
|
+
/**
|
|
1454
|
+
* Write a themed 404 page during SSG.
|
|
1455
|
+
*
|
|
1456
|
+
* Off by default. `true` reads `404.md` from `srcDir` and writes `404.html`.
|
|
1457
|
+
* An object enables the feature and overrides only the fields you set.
|
|
1458
|
+
* When the source file is missing, a built-in "Page not found" page is
|
|
1459
|
+
* written instead. The page is omitted from the search index and sitemap.
|
|
1460
|
+
*
|
|
1461
|
+
* @default false
|
|
1462
|
+
*/
|
|
1463
|
+
notFound?: boolean | NotFoundOptions;
|
|
1464
|
+
/**
|
|
1465
|
+
* Render a static members card grid on pages with `layout: team`.
|
|
1466
|
+
*
|
|
1467
|
+
* Off by default. `true` enables an empty list. An object enables the
|
|
1468
|
+
* feature and supplies `members`. When the option is off, `layout: team`
|
|
1469
|
+
* is ignored and the page stays ordinary.
|
|
1470
|
+
*
|
|
1471
|
+
* @default false
|
|
1472
|
+
*/
|
|
1473
|
+
team?: boolean | TeamOptions;
|
|
1474
|
+
/**
|
|
1475
|
+
* Opt-in blog index, authors, tags, reading time, and archive.
|
|
1476
|
+
*
|
|
1477
|
+
* Off by default. `true` enables defaults. An object enables the feature
|
|
1478
|
+
* and overrides only the fields you set. Top-level `blog` wins when both
|
|
1479
|
+
* are set.
|
|
1480
|
+
*
|
|
1481
|
+
* @default false
|
|
1482
|
+
*/
|
|
1483
|
+
blog?: boolean | BlogOptions;
|
|
1484
|
+
/**
|
|
1485
|
+
* Generate a static index for directories that have child pages but no
|
|
1486
|
+
* `index.md` / `index.mdx`.
|
|
1487
|
+
*
|
|
1488
|
+
* Off by default. `true` enables card listings. An object enables the
|
|
1489
|
+
* feature and can switch the listing to `list`. Existing content indexes
|
|
1490
|
+
* are never overwritten.
|
|
1491
|
+
*
|
|
1492
|
+
* @default false
|
|
1493
|
+
*/
|
|
1494
|
+
sectionIndex?: boolean | SectionIndexOptions;
|
|
1101
1495
|
/**
|
|
1102
1496
|
* Absolute site URL used when generating social metadata.
|
|
1103
1497
|
*
|
|
@@ -1139,12 +1533,120 @@ interface SsgOptions {
|
|
|
1139
1533
|
*/
|
|
1140
1534
|
navigation?: SsgNavigationGroup[];
|
|
1141
1535
|
}
|
|
1536
|
+
/**
|
|
1537
|
+
* Per-control flags for `ssg.readerChrome`.
|
|
1538
|
+
*
|
|
1539
|
+
* Omitted fields stay on when the feature itself is enabled.
|
|
1540
|
+
*/
|
|
1541
|
+
interface ReaderChromeOptions {
|
|
1542
|
+
/**
|
|
1543
|
+
* Copy button on fenced code blocks. The clipboard is read in the browser,
|
|
1544
|
+
* never at build time.
|
|
1545
|
+
*
|
|
1546
|
+
* @default true
|
|
1547
|
+
*/
|
|
1548
|
+
copy?: boolean;
|
|
1549
|
+
/**
|
|
1550
|
+
* Icon and `rel="noopener noreferrer"` on outbound `http(s)` links.
|
|
1551
|
+
* Relative, hash, and same-document links are left alone.
|
|
1552
|
+
*
|
|
1553
|
+
* @default true
|
|
1554
|
+
*/
|
|
1555
|
+
externalLinks?: boolean;
|
|
1556
|
+
/**
|
|
1557
|
+
* Back-to-top control that appears after the page is scrolled.
|
|
1558
|
+
*
|
|
1559
|
+
* @default true
|
|
1560
|
+
*/
|
|
1561
|
+
backToTop?: boolean;
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Resolved reader chrome. `false` means no extra markup or JS.
|
|
1565
|
+
*/
|
|
1566
|
+
type ResolvedReaderChrome = false | {
|
|
1567
|
+
copy: boolean;
|
|
1568
|
+
externalLinks: boolean;
|
|
1569
|
+
backToTop: boolean;
|
|
1570
|
+
};
|
|
1571
|
+
/**
|
|
1572
|
+
* Per-control flags for `ssg.a11y`.
|
|
1573
|
+
*
|
|
1574
|
+
* Omitted fields keep the defaults when the feature itself is enabled.
|
|
1575
|
+
*/
|
|
1576
|
+
interface A11yOptions {
|
|
1577
|
+
/**
|
|
1578
|
+
* Visible label for the skip link. Escaped in HTML.
|
|
1579
|
+
*
|
|
1580
|
+
* @default "Skip to content"
|
|
1581
|
+
*/
|
|
1582
|
+
skipLinkLabel?: string;
|
|
1583
|
+
}
|
|
1584
|
+
/**
|
|
1585
|
+
* Resolved skip-link / print styles. `false` means no extra markup or CSS.
|
|
1586
|
+
*/
|
|
1587
|
+
type ResolvedA11y = false | {
|
|
1588
|
+
skipLinkLabel: string;
|
|
1589
|
+
};
|
|
1590
|
+
/**
|
|
1591
|
+
* Per-control flags for `ssg.jsonLd`.
|
|
1592
|
+
*
|
|
1593
|
+
* Omitted fields keep the defaults when the feature itself is enabled.
|
|
1594
|
+
*/
|
|
1595
|
+
interface JsonLdOptions {
|
|
1596
|
+
/**
|
|
1597
|
+
* Emit `BreadcrumbList` when a visible breadcrumb trail exists.
|
|
1598
|
+
*
|
|
1599
|
+
* @default true
|
|
1600
|
+
*/
|
|
1601
|
+
breadcrumbs?: boolean;
|
|
1602
|
+
/**
|
|
1603
|
+
* Optional publisher. Only configured `name` / `url` are written.
|
|
1604
|
+
* Logo and other Organization fields are never invented.
|
|
1605
|
+
*/
|
|
1606
|
+
publisher?: JsonLdPublisherOptions;
|
|
1607
|
+
/**
|
|
1608
|
+
* Page `@type`. Defaults to `TechArticle`.
|
|
1609
|
+
*/
|
|
1610
|
+
type?: JsonLdPageType;
|
|
1611
|
+
/**
|
|
1612
|
+
* Extra `@graph` nodes. Only objects are kept. The build does not invent
|
|
1613
|
+
* fields inside them.
|
|
1614
|
+
*/
|
|
1615
|
+
graph?: Record<string, unknown>[];
|
|
1616
|
+
}
|
|
1617
|
+
/** JSON-LD page node `@type`. Unknown values fall back to `TechArticle`. */
|
|
1618
|
+
type JsonLdPageType = "TechArticle" | "BlogPosting" | "WebPage";
|
|
1619
|
+
/**
|
|
1620
|
+
* Optional JSON-LD publisher. Empty or omitted fields are left out.
|
|
1621
|
+
*/
|
|
1622
|
+
interface JsonLdPublisherOptions {
|
|
1623
|
+
/** Organization name. */
|
|
1624
|
+
name?: string;
|
|
1625
|
+
/** Organization URL. `javascript:` and other unsafe schemes are dropped. */
|
|
1626
|
+
url?: string;
|
|
1627
|
+
}
|
|
1628
|
+
/**
|
|
1629
|
+
* Resolved JSON-LD options. `false` means no `<script type="application/ld+json">`.
|
|
1630
|
+
*/
|
|
1631
|
+
type ResolvedJsonLd = false | {
|
|
1632
|
+
breadcrumbs: boolean;
|
|
1633
|
+
publisher?: {
|
|
1634
|
+
name?: string;
|
|
1635
|
+
url?: string;
|
|
1636
|
+
};
|
|
1637
|
+
type?: JsonLdPageType;
|
|
1638
|
+
graph?: Record<string, unknown>[];
|
|
1639
|
+
};
|
|
1142
1640
|
/**
|
|
1143
1641
|
* Resolved SSG options.
|
|
1144
1642
|
*/
|
|
1145
1643
|
interface ResolvedSsgOptions {
|
|
1146
1644
|
enabled: boolean;
|
|
1147
1645
|
extension: string;
|
|
1646
|
+
/**
|
|
1647
|
+
* Present after `resolveSsgOptions`. Omitted / empty means off.
|
|
1648
|
+
*/
|
|
1649
|
+
routePrefix?: string;
|
|
1148
1650
|
clean: boolean;
|
|
1149
1651
|
bare: boolean;
|
|
1150
1652
|
render?: ThemeComponent;
|
|
@@ -1156,538 +1658,2225 @@ interface ResolvedSsgOptions {
|
|
|
1156
1658
|
ogImage?: string;
|
|
1157
1659
|
generateOgImage: boolean;
|
|
1158
1660
|
lastUpdated: boolean;
|
|
1159
|
-
siteUrl?: string;
|
|
1160
|
-
theme?: ResolvedThemeConfig;
|
|
1161
|
-
navigation?: SsgNavigationGroup[];
|
|
1162
|
-
}
|
|
1163
|
-
/**
|
|
1164
|
-
* Options for the core `oxContent()` Vite plugin.
|
|
1165
|
-
*
|
|
1166
|
-
* The top-level options describe where content lives, which Markdown features
|
|
1167
|
-
* are enabled, and which build-time features should run. Feature toggles that
|
|
1168
|
-
* accept `boolean | Options` follow the same convention:
|
|
1169
|
-
*
|
|
1170
|
-
* - `false` disables the feature.
|
|
1171
|
-
* - `true` enables the feature with its documented defaults.
|
|
1172
|
-
* - an object enables the feature and overrides only the provided fields.
|
|
1173
|
-
*/
|
|
1174
|
-
interface OxContentOptions {
|
|
1175
|
-
/**
|
|
1176
|
-
* Directory containing Markdown source files.
|
|
1177
|
-
*
|
|
1178
|
-
* The path is resolved from the Vite project root. SSG, search indexing, and
|
|
1179
|
-
* dev-server routing all use this directory as the content root.
|
|
1180
|
-
*
|
|
1181
|
-
* @default 'content'
|
|
1182
|
-
*/
|
|
1183
|
-
srcDir?: string;
|
|
1184
1661
|
/**
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1187
|
-
* SSG HTML, search indexes, and generated assets are emitted under this
|
|
1188
|
-
* directory during production builds.
|
|
1189
|
-
*
|
|
1190
|
-
* @default 'dist'
|
|
1662
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1191
1663
|
*/
|
|
1192
|
-
|
|
1664
|
+
contributors?: ResolvedContributors;
|
|
1665
|
+
pagination: boolean;
|
|
1666
|
+
breadcrumbs: boolean;
|
|
1667
|
+
jsonLd: ResolvedJsonLd;
|
|
1193
1668
|
/**
|
|
1194
|
-
*
|
|
1195
|
-
*
|
|
1196
|
-
* Use this when the site is deployed below a sub-path, such as GitHub Pages or
|
|
1197
|
-
* a documentation route inside a larger application.
|
|
1198
|
-
*
|
|
1199
|
-
* @default '/'
|
|
1669
|
+
* Present after `resolveSsgOptions`. Omitted / `false` means off.
|
|
1200
1670
|
*/
|
|
1201
|
-
|
|
1671
|
+
headValidation?: false | "warn" | "strict";
|
|
1672
|
+
readerChrome: ResolvedReaderChrome;
|
|
1673
|
+
localeSwitcher: boolean;
|
|
1674
|
+
a11y: ResolvedA11y;
|
|
1675
|
+
pageChrome: boolean;
|
|
1202
1676
|
/**
|
|
1203
|
-
*
|
|
1204
|
-
*
|
|
1205
|
-
* Extensions are normalized with a leading dot and matched case-insensitively.
|
|
1206
|
-
* Add custom extensions when another authoring format is compiled to Markdown
|
|
1207
|
-
* before ox-content sees it.
|
|
1208
|
-
*
|
|
1209
|
-
* @default ['.md', '.markdown', '.mdx']
|
|
1677
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1210
1678
|
*/
|
|
1211
|
-
|
|
1679
|
+
markdownSource?: ResolvedMarkdownSourceOptions;
|
|
1212
1680
|
/**
|
|
1213
|
-
*
|
|
1214
|
-
*
|
|
1215
|
-
* Passing `true` or omitting this option enables SSG with defaults. Passing
|
|
1216
|
-
* `false` disables the SSG plugin while still allowing Markdown module
|
|
1217
|
-
* transforms to run.
|
|
1218
|
-
*
|
|
1219
|
-
* @default { enabled: true }
|
|
1681
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1220
1682
|
*/
|
|
1221
|
-
|
|
1683
|
+
notFound?: ResolvedNotFoundOptions;
|
|
1222
1684
|
/**
|
|
1223
|
-
*
|
|
1224
|
-
* @default true
|
|
1685
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1225
1686
|
*/
|
|
1226
|
-
|
|
1687
|
+
team?: ResolvedTeamOptions;
|
|
1227
1688
|
/**
|
|
1228
|
-
*
|
|
1229
|
-
* @default true
|
|
1689
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1230
1690
|
*/
|
|
1231
|
-
|
|
1691
|
+
blog?: ResolvedBlogOptions;
|
|
1692
|
+
sectionIndex?: ResolvedSectionIndexOptions;
|
|
1693
|
+
siteUrl?: string;
|
|
1694
|
+
theme?: ResolvedThemeConfig;
|
|
1695
|
+
navigation?: SsgNavigationGroup[];
|
|
1696
|
+
}
|
|
1697
|
+
/**
|
|
1698
|
+
* Opt-in custom 404 page written during SSG.
|
|
1699
|
+
*/
|
|
1700
|
+
interface NotFoundOptions {
|
|
1232
1701
|
/**
|
|
1233
|
-
*
|
|
1234
|
-
* @default
|
|
1702
|
+
* Markdown source relative to `srcDir`.
|
|
1703
|
+
* @default "404.md"
|
|
1235
1704
|
*/
|
|
1236
|
-
|
|
1705
|
+
source?: string;
|
|
1237
1706
|
/**
|
|
1238
|
-
*
|
|
1239
|
-
* @default
|
|
1707
|
+
* Output file relative to `outDir`.
|
|
1708
|
+
* @default "404.html"
|
|
1240
1709
|
*/
|
|
1241
|
-
|
|
1710
|
+
output?: string;
|
|
1711
|
+
}
|
|
1712
|
+
/**
|
|
1713
|
+
* Resolved custom 404 options.
|
|
1714
|
+
*/
|
|
1715
|
+
interface ResolvedNotFoundOptions {
|
|
1716
|
+
enabled: boolean;
|
|
1717
|
+
source: string;
|
|
1718
|
+
output: string;
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* One link on a team member card.
|
|
1722
|
+
*/
|
|
1723
|
+
interface TeamLink {
|
|
1724
|
+
/** Visible label. Escaped in HTML. */
|
|
1725
|
+
label: string;
|
|
1726
|
+
/** Destination. Only `https:` or a site-relative `/` path is emitted. */
|
|
1727
|
+
href: string;
|
|
1728
|
+
}
|
|
1729
|
+
/**
|
|
1730
|
+
* One person on the team page.
|
|
1731
|
+
*/
|
|
1732
|
+
interface TeamMember {
|
|
1733
|
+
/** Display name. Escaped in HTML. */
|
|
1734
|
+
name: string;
|
|
1735
|
+
/** Optional role or title. Escaped in HTML. */
|
|
1736
|
+
role?: string;
|
|
1737
|
+
/** Avatar URL. Only `https:` or a site-relative `/` path is emitted. */
|
|
1738
|
+
avatar?: string;
|
|
1739
|
+
/** Optional profile or social links. */
|
|
1740
|
+
links?: TeamLink[];
|
|
1741
|
+
}
|
|
1742
|
+
/**
|
|
1743
|
+
* Opt-in team / members page.
|
|
1744
|
+
*/
|
|
1745
|
+
/**
|
|
1746
|
+
* Opt-in git contributor list.
|
|
1747
|
+
*/
|
|
1748
|
+
interface ContributorsOptions {
|
|
1242
1749
|
/**
|
|
1243
|
-
*
|
|
1244
|
-
*
|
|
1750
|
+
* Author names or emails to omit. Comparison is case-insensitive and
|
|
1751
|
+
* matches the full name or the full email.
|
|
1245
1752
|
*/
|
|
1246
|
-
|
|
1753
|
+
ignore?: string[];
|
|
1247
1754
|
/**
|
|
1248
|
-
*
|
|
1249
|
-
*
|
|
1755
|
+
* When true and a git author email is present, render a Gravatar
|
|
1756
|
+
* image from the MD5 of that email. The raw email is never written
|
|
1757
|
+
* into HTML. Default is names only.
|
|
1250
1758
|
*/
|
|
1251
|
-
|
|
1759
|
+
avatars?: boolean;
|
|
1760
|
+
}
|
|
1761
|
+
/**
|
|
1762
|
+
* Resolved git contributor list. `false` means the feature is off.
|
|
1763
|
+
*/
|
|
1764
|
+
type ResolvedContributors = false | {
|
|
1765
|
+
ignore: string[];
|
|
1766
|
+
avatars: boolean;
|
|
1767
|
+
};
|
|
1768
|
+
interface TeamOptions {
|
|
1252
1769
|
/**
|
|
1253
|
-
*
|
|
1254
|
-
* @default
|
|
1770
|
+
* People rendered as static cards on `layout: team` pages.
|
|
1771
|
+
* @default []
|
|
1255
1772
|
*/
|
|
1256
|
-
|
|
1773
|
+
members?: TeamMember[];
|
|
1774
|
+
}
|
|
1775
|
+
/**
|
|
1776
|
+
* Resolved team page options.
|
|
1777
|
+
*/
|
|
1778
|
+
interface ResolvedTeamOptions {
|
|
1779
|
+
enabled: boolean;
|
|
1780
|
+
members: TeamMember[];
|
|
1781
|
+
}
|
|
1782
|
+
/**
|
|
1783
|
+
* Listing style for a generated section index.
|
|
1784
|
+
*/
|
|
1785
|
+
type SectionIndexStyle = "list" | "cards";
|
|
1786
|
+
/**
|
|
1787
|
+
* Opt-in generated section index pages.
|
|
1788
|
+
*/
|
|
1789
|
+
interface SectionIndexOptions {
|
|
1257
1790
|
/**
|
|
1258
|
-
*
|
|
1259
|
-
*
|
|
1260
|
-
* Defaults to `'css-variables'`, which renders token colors as `--octc-shiki-*`
|
|
1261
|
-
* custom properties so highlighting follows the active color scheme in both
|
|
1262
|
-
* light and dark from one build. Without a `@ox-content/theme-color-*`
|
|
1263
|
-
* package installed the properties fall back to GitHub Dark. Pass any bundled
|
|
1264
|
-
* Shiki theme name to opt out and bake fixed colors in instead.
|
|
1265
|
-
*
|
|
1266
|
-
* @default 'css-variables'
|
|
1791
|
+
* How children are rendered. `cards` is the default when the feature is on.
|
|
1792
|
+
* @default "cards"
|
|
1267
1793
|
*/
|
|
1268
|
-
|
|
1794
|
+
style?: SectionIndexStyle;
|
|
1795
|
+
}
|
|
1796
|
+
/**
|
|
1797
|
+
* Resolved generated section index options.
|
|
1798
|
+
*/
|
|
1799
|
+
interface ResolvedSectionIndexOptions {
|
|
1800
|
+
enabled: boolean;
|
|
1801
|
+
style: SectionIndexStyle;
|
|
1802
|
+
}
|
|
1803
|
+
/**
|
|
1804
|
+
* Opt-in web app manifest and service worker written during SSG.
|
|
1805
|
+
*
|
|
1806
|
+
* Enabling `offline` (the default when the feature is on) injects a tiny
|
|
1807
|
+
* client script that registers `sw.js`. Set `offline: false` to keep the
|
|
1808
|
+
* manifest without that script.
|
|
1809
|
+
*/
|
|
1810
|
+
interface PwaOptions {
|
|
1269
1811
|
/**
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1272
|
-
* These are loaded alongside the built-in languages.
|
|
1273
|
-
* @default []
|
|
1812
|
+
* Write `sw.js` and register it from themed pages.
|
|
1813
|
+
* @default true
|
|
1274
1814
|
*/
|
|
1275
|
-
|
|
1815
|
+
offline?: boolean;
|
|
1276
1816
|
/**
|
|
1277
|
-
*
|
|
1278
|
-
*
|
|
1279
|
-
* This feature is opt-in because it changes rendered code-block markup. Pass
|
|
1280
|
-
* `true` to enable ox-content's attribute syntax, or pass an options object to
|
|
1281
|
-
* change the meta key or enable VitePress-compatible notation.
|
|
1282
|
-
*
|
|
1283
|
-
* @example
|
|
1284
|
-
* ~~~md
|
|
1285
|
-
* ```ts annotate="highlight:1,3-4;warning:6;error:7"
|
|
1286
|
-
* const value = compute()
|
|
1287
|
-
* ```
|
|
1288
|
-
* ~~~
|
|
1289
|
-
*
|
|
1290
|
-
* @default false
|
|
1817
|
+
* Manifest `name`. Falls back to `ssg.siteName` when omitted.
|
|
1291
1818
|
*/
|
|
1292
|
-
|
|
1819
|
+
name?: string;
|
|
1293
1820
|
/**
|
|
1294
|
-
*
|
|
1295
|
-
*
|
|
1296
|
-
* Use this for knowledge-base style content where authors prefer short,
|
|
1297
|
-
* document-relative link syntax. Pass an object to override the base URL used
|
|
1298
|
-
* when resolving generated hrefs.
|
|
1299
|
-
*
|
|
1300
|
-
* @default false
|
|
1821
|
+
* Manifest `short_name`. Falls back to `name` when omitted.
|
|
1301
1822
|
*/
|
|
1302
|
-
|
|
1823
|
+
shortName?: string;
|
|
1303
1824
|
/**
|
|
1304
|
-
*
|
|
1305
|
-
*
|
|
1306
|
-
* Built-in aliases cover common emoji names. Provide `custom` entries for
|
|
1307
|
-
* project-specific aliases or to override a built-in mapping.
|
|
1308
|
-
*
|
|
1309
|
-
* @default false
|
|
1825
|
+
* Manifest / meta theme color. Hex (`#rgb` / `#rrggbb`) or a CSS color name.
|
|
1826
|
+
* @default "#000000"
|
|
1310
1827
|
*/
|
|
1311
|
-
|
|
1828
|
+
themeColor?: string;
|
|
1312
1829
|
/**
|
|
1313
|
-
*
|
|
1314
|
-
*
|
|
1315
|
-
* Attribute blocks can be attached to headings, paragraphs, links, images, and
|
|
1316
|
-
* other supported Markdown nodes depending on parser context.
|
|
1317
|
-
*
|
|
1318
|
-
* @default false
|
|
1830
|
+
* Manifest background color. Hex or a CSS color name.
|
|
1831
|
+
* @default "#ffffff"
|
|
1319
1832
|
*/
|
|
1320
|
-
|
|
1833
|
+
backgroundColor?: string;
|
|
1321
1834
|
/**
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1324
|
-
* This is useful for documentation that must stay synchronized with examples
|
|
1325
|
-
* in the repository. Use `rootDir` when snippets should resolve from a
|
|
1326
|
-
* directory other than the Vite project root.
|
|
1327
|
-
*
|
|
1328
|
-
* @default false
|
|
1835
|
+
* Manifest `start_url`. Same-origin site paths only (`/`, `/docs/`).
|
|
1836
|
+
* Defaults to the Vite `base`.
|
|
1329
1837
|
*/
|
|
1330
|
-
|
|
1838
|
+
startUrl?: string;
|
|
1839
|
+
}
|
|
1840
|
+
/**
|
|
1841
|
+
* Resolved PWA options.
|
|
1842
|
+
*/
|
|
1843
|
+
interface ResolvedPwaOptions {
|
|
1844
|
+
enabled: boolean;
|
|
1845
|
+
offline: boolean;
|
|
1846
|
+
name?: string;
|
|
1847
|
+
shortName?: string;
|
|
1848
|
+
themeColor?: string;
|
|
1849
|
+
backgroundColor?: string;
|
|
1850
|
+
startUrl?: string;
|
|
1851
|
+
}
|
|
1852
|
+
/**
|
|
1853
|
+
* Opt-in self-hosted Iconify CSS for used icons.
|
|
1854
|
+
*
|
|
1855
|
+
* Off by default. When enabled, the SSG build resolves Iconify names from
|
|
1856
|
+
* installed `@iconify/json` or `@iconify-json/*` packages and emits CSS
|
|
1857
|
+
* masks so the published site does not request `api.iconify.design`.
|
|
1858
|
+
*/
|
|
1859
|
+
interface IconsOptions {
|
|
1331
1860
|
/**
|
|
1332
|
-
*
|
|
1333
|
-
*
|
|
1334
|
-
* Enable this for untrusted Markdown. The default allow lists are conservative;
|
|
1335
|
-
* pass an options object only when the content model intentionally needs extra
|
|
1336
|
-
* tags, attributes, or URL schemes.
|
|
1337
|
-
*
|
|
1338
|
-
* @default false
|
|
1861
|
+
* CSS emission mode.
|
|
1862
|
+
* @default "css-mask"
|
|
1339
1863
|
*/
|
|
1340
|
-
|
|
1864
|
+
mode?: "css-mask";
|
|
1341
1865
|
/**
|
|
1342
|
-
*
|
|
1343
|
-
*
|
|
1344
|
-
* The feature is enabled only when `repoUrl` is provided in the options object.
|
|
1345
|
-
* Passing `true` keeps the feature disabled because there is not enough
|
|
1346
|
-
* repository information to generate valid links.
|
|
1347
|
-
*
|
|
1348
|
-
* @default false
|
|
1866
|
+
* Class syntax. `"unocss"` emits `icon-[prefix--name]`.
|
|
1867
|
+
* @default "unocss"
|
|
1349
1868
|
*/
|
|
1350
|
-
|
|
1869
|
+
syntax?: "unocss";
|
|
1351
1870
|
/**
|
|
1352
|
-
*
|
|
1353
|
-
*
|
|
1354
|
-
* @default false
|
|
1871
|
+
* Glob patterns to scan, or explicit `prefix:name` icons.
|
|
1872
|
+
* Entries that look like Iconify names are used as-is (no scan).
|
|
1355
1873
|
*/
|
|
1356
|
-
|
|
1874
|
+
include?: string[];
|
|
1357
1875
|
/**
|
|
1358
|
-
*
|
|
1359
|
-
*
|
|
1360
|
-
* Use this as a lightweight authoring check for missing languages or trailing
|
|
1361
|
-
* whitespace inside fences. For project-wide linting, prefer the exported
|
|
1362
|
-
* `lintCodeBlocks()` helper or the Markdown lint APIs.
|
|
1363
|
-
*
|
|
1364
|
-
* @default false
|
|
1876
|
+
* Iconify names that are always emitted, even when no source mentions them.
|
|
1365
1877
|
*/
|
|
1366
|
-
|
|
1878
|
+
safelist?: string[];
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* Resolved icon asset options.
|
|
1882
|
+
*/
|
|
1883
|
+
interface ResolvedIconsOptions {
|
|
1884
|
+
enabled: boolean;
|
|
1885
|
+
mode: "css-mask";
|
|
1886
|
+
syntax: "unocss";
|
|
1887
|
+
include: string[];
|
|
1888
|
+
safelist: string[];
|
|
1889
|
+
}
|
|
1890
|
+
/**
|
|
1891
|
+
* Opt-in Markdown source companions written beside generated HTML.
|
|
1892
|
+
*/
|
|
1893
|
+
interface MarkdownSourceOptions {
|
|
1367
1894
|
/**
|
|
1368
|
-
*
|
|
1369
|
-
*
|
|
1370
|
-
* By default only fences with explicit opt-in metadata are checked. This keeps
|
|
1371
|
-
* incidental examples cheap while allowing docs-as-code snippets to fail the
|
|
1372
|
-
* build when configured with `mode: 'error'`.
|
|
1373
|
-
*
|
|
1374
|
-
* @default false
|
|
1895
|
+
* Add `<link rel="alternate" type="text/markdown">` to generated HTML.
|
|
1896
|
+
* @default true
|
|
1375
1897
|
*/
|
|
1376
|
-
|
|
1898
|
+
alternate?: boolean;
|
|
1377
1899
|
/**
|
|
1378
|
-
*
|
|
1379
|
-
*
|
|
1380
|
-
*
|
|
1381
|
-
* part of a normal Vitest suite.
|
|
1382
|
-
*
|
|
1900
|
+
* Show a page-level Copy as Markdown control in the default theme.
|
|
1901
|
+
* The control copies or opens the published companion bytes, including
|
|
1902
|
+
* frontmatter. Off unless set, even when companions are enabled.
|
|
1383
1903
|
* @default false
|
|
1384
1904
|
*/
|
|
1385
|
-
|
|
1905
|
+
copy?: boolean;
|
|
1906
|
+
}
|
|
1907
|
+
/**
|
|
1908
|
+
* Resolved Markdown source-companion options.
|
|
1909
|
+
*/
|
|
1910
|
+
interface ResolvedMarkdownSourceOptions {
|
|
1911
|
+
enabled: boolean;
|
|
1912
|
+
alternate: boolean;
|
|
1913
|
+
copy: boolean;
|
|
1914
|
+
}
|
|
1915
|
+
/**
|
|
1916
|
+
* Opt-in crawl manifests written during SSG.
|
|
1917
|
+
*/
|
|
1918
|
+
interface SiteMapsOptions {
|
|
1386
1919
|
/**
|
|
1387
|
-
*
|
|
1388
|
-
* @default
|
|
1920
|
+
* Write `robots.txt` with a Sitemap line.
|
|
1921
|
+
* @default true
|
|
1389
1922
|
*/
|
|
1390
|
-
|
|
1923
|
+
robots?: boolean;
|
|
1391
1924
|
/**
|
|
1392
|
-
*
|
|
1925
|
+
* Write `llms.txt` with the site title, description, and page URLs.
|
|
1393
1926
|
* @default true
|
|
1394
1927
|
*/
|
|
1395
|
-
|
|
1928
|
+
llms?: boolean;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* Resolved crawl-manifest options.
|
|
1932
|
+
*/
|
|
1933
|
+
interface ResolvedSiteMapsOptions {
|
|
1934
|
+
enabled: boolean;
|
|
1935
|
+
robots: boolean;
|
|
1936
|
+
llms: boolean;
|
|
1937
|
+
}
|
|
1938
|
+
/**
|
|
1939
|
+
* Opt-in draft / unlisted / scheduled page filtering.
|
|
1940
|
+
*/
|
|
1941
|
+
interface PublishStateOptions {
|
|
1396
1942
|
/**
|
|
1397
|
-
*
|
|
1398
|
-
* @default true
|
|
1943
|
+
* When `false`, frontmatter publish fields are ignored.
|
|
1944
|
+
* @default true when the option is an object
|
|
1399
1945
|
*/
|
|
1400
|
-
|
|
1946
|
+
enabled?: boolean;
|
|
1401
1947
|
/**
|
|
1402
|
-
*
|
|
1403
|
-
*
|
|
1948
|
+
* Injected ISO-8601 clock compared against `scheduled`, `date`, and `expiry`.
|
|
1949
|
+
* Invalid values fall back to the system clock.
|
|
1404
1950
|
*/
|
|
1405
|
-
|
|
1951
|
+
now?: string;
|
|
1406
1952
|
/**
|
|
1407
|
-
*
|
|
1953
|
+
* Keep draft and not-yet-scheduled pages in output. The dev server sets this.
|
|
1408
1954
|
* @default false
|
|
1409
1955
|
*/
|
|
1410
|
-
|
|
1956
|
+
includeDrafts?: boolean;
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* Resolved publish-state options.
|
|
1960
|
+
*/
|
|
1961
|
+
interface ResolvedPublishStateOptions {
|
|
1962
|
+
enabled: boolean;
|
|
1963
|
+
now?: string;
|
|
1964
|
+
includeDrafts: boolean;
|
|
1965
|
+
}
|
|
1966
|
+
/**
|
|
1967
|
+
* Opt-in frontmatter `permalink` / `slug` routing.
|
|
1968
|
+
*
|
|
1969
|
+
* `false` or omitted stays off. `true` or `{}` enables defaults.
|
|
1970
|
+
* Set `enabled: false` on the object to turn the feature back off.
|
|
1971
|
+
*/
|
|
1972
|
+
interface PermalinksOptions {
|
|
1411
1973
|
/**
|
|
1412
|
-
*
|
|
1413
|
-
*
|
|
1414
|
-
* @default { vuePlugin: 'vitejs', width: 1200, height: 630, cache: true, concurrency: 1 }
|
|
1974
|
+
* Enable permalink / slug routing.
|
|
1975
|
+
* @default true
|
|
1415
1976
|
*/
|
|
1416
|
-
|
|
1977
|
+
enabled?: boolean;
|
|
1978
|
+
}
|
|
1979
|
+
/**
|
|
1980
|
+
* Resolved permalink options.
|
|
1981
|
+
*/
|
|
1982
|
+
interface ResolvedPermalinksOptions {
|
|
1983
|
+
enabled: boolean;
|
|
1984
|
+
}
|
|
1985
|
+
/**
|
|
1986
|
+
* Opt-in `_index` directory frontmatter cascade.
|
|
1987
|
+
*
|
|
1988
|
+
* `false` or omitted stays off. `true` or `{}` enables defaults.
|
|
1989
|
+
* Set `enabled: false` on the object to turn the feature back off.
|
|
1990
|
+
*/
|
|
1991
|
+
interface CascadeOptions {
|
|
1417
1992
|
/**
|
|
1418
|
-
*
|
|
1419
|
-
*
|
|
1420
|
-
* @default []
|
|
1993
|
+
* Enable directory-level frontmatter inheritance.
|
|
1994
|
+
* @default true
|
|
1421
1995
|
*/
|
|
1422
|
-
|
|
1996
|
+
enabled?: boolean;
|
|
1997
|
+
}
|
|
1998
|
+
/**
|
|
1999
|
+
* Resolved cascade options.
|
|
2000
|
+
*/
|
|
2001
|
+
interface ResolvedCascadeOptions {
|
|
2002
|
+
enabled: boolean;
|
|
2003
|
+
}
|
|
2004
|
+
/**
|
|
2005
|
+
* Host that consumes the generated `_redirects` file.
|
|
2006
|
+
*
|
|
2007
|
+
* Both values write the same `_redirects` body today. The distinct names
|
|
2008
|
+
* leave room for provider-specific limits and diagnostics later.
|
|
2009
|
+
*/
|
|
2010
|
+
type RedirectProvider = "netlify" | "cloudflare";
|
|
2011
|
+
/**
|
|
2012
|
+
* Opt-in static redirects, aliases, and path rewrites.
|
|
2013
|
+
*
|
|
2014
|
+
* A path map such as `{ "/old-guide": "/guide" }` is also accepted in place
|
|
2015
|
+
* of this object and enables the feature with that map.
|
|
2016
|
+
*/
|
|
2017
|
+
interface RedirectsOptions {
|
|
1423
2018
|
/**
|
|
1424
|
-
*
|
|
1425
|
-
*
|
|
1426
|
-
* @default {
|
|
2019
|
+
* Old path to new path. Destinations must be same-origin (`/` but not `//`)
|
|
2020
|
+
* unless `allowExternal` is set.
|
|
2021
|
+
* @default {}
|
|
1427
2022
|
*/
|
|
1428
|
-
|
|
2023
|
+
map?: Record<string, string>;
|
|
1429
2024
|
/**
|
|
1430
|
-
*
|
|
1431
|
-
*
|
|
1432
|
-
*
|
|
2025
|
+
* Host that should receive a `_redirects` file.
|
|
2026
|
+
*
|
|
2027
|
+
* Omit the field to detect `CF_PAGES=1`, `WORKERS_CI=1`, or `NETLIFY=true`.
|
|
2028
|
+
* Local builds and GitHub Actions should set this explicitly. HTML redirect
|
|
2029
|
+
* pages are independent of this selector.
|
|
1433
2030
|
*/
|
|
1434
|
-
|
|
2031
|
+
provider?: RedirectProvider;
|
|
1435
2032
|
/**
|
|
1436
|
-
*
|
|
1437
|
-
*
|
|
1438
|
-
|
|
2033
|
+
* Write a `_headers` Location map next to the HTML pages.
|
|
2034
|
+
* @default false
|
|
2035
|
+
*/
|
|
2036
|
+
headers?: boolean;
|
|
2037
|
+
/**
|
|
2038
|
+
* Write a machine-readable `redirects.json` map.
|
|
2039
|
+
* @default false
|
|
2040
|
+
*/
|
|
2041
|
+
json?: boolean;
|
|
2042
|
+
/**
|
|
2043
|
+
* Allow `http://` and `https://` destinations. `javascript:`, `data:`, and
|
|
2044
|
+
* protocol-relative `//` targets stay rejected.
|
|
2045
|
+
* @default false
|
|
2046
|
+
*/
|
|
2047
|
+
allowExternal?: boolean;
|
|
2048
|
+
}
|
|
2049
|
+
/**
|
|
2050
|
+
* Resolved redirect options.
|
|
2051
|
+
*/
|
|
2052
|
+
interface ResolvedRedirectsOptions {
|
|
2053
|
+
enabled: boolean;
|
|
2054
|
+
map: Record<string, string>;
|
|
2055
|
+
provider?: RedirectProvider;
|
|
2056
|
+
headers: boolean;
|
|
2057
|
+
json: boolean;
|
|
2058
|
+
allowExternal: boolean;
|
|
2059
|
+
}
|
|
2060
|
+
/**
|
|
2061
|
+
* Feed file formats written during SSG.
|
|
2062
|
+
*/
|
|
2063
|
+
type FeedFormat = "rss" | "atom" | "json";
|
|
2064
|
+
/**
|
|
2065
|
+
* One feed's formats, source, output path, and channel metadata.
|
|
2066
|
+
*/
|
|
2067
|
+
interface FeedChannelOptions {
|
|
2068
|
+
/**
|
|
2069
|
+
* Feed formats to write.
|
|
2070
|
+
* @default ["rss", "atom", "json"]
|
|
2071
|
+
*/
|
|
2072
|
+
formats?: readonly FeedFormat[];
|
|
2073
|
+
/**
|
|
2074
|
+
* Named collection to publish. Defaults to `content`, or the first
|
|
2075
|
+
* configured collection when `content` is absent.
|
|
2076
|
+
*/
|
|
2077
|
+
collection?: string;
|
|
2078
|
+
/**
|
|
2079
|
+
* Maximum number of published items, newest first.
|
|
2080
|
+
* @default 20
|
|
2081
|
+
*/
|
|
2082
|
+
limit?: number;
|
|
2083
|
+
/**
|
|
2084
|
+
* Site-relative directory for the generated files.
|
|
2085
|
+
* @default "/"
|
|
2086
|
+
*/
|
|
2087
|
+
path?: string;
|
|
2088
|
+
/** Channel title. Defaults to the SSG site name. */
|
|
2089
|
+
title?: string;
|
|
2090
|
+
/** Channel description. Defaults to the SSG site description. */
|
|
2091
|
+
description?: string;
|
|
2092
|
+
/** Channel language (`en`, `ja`, …). Omitted when unset. */
|
|
2093
|
+
language?: string;
|
|
2094
|
+
/** Channel image URL (RSS image / Atom logo / JSON Feed icon). */
|
|
2095
|
+
image?: string;
|
|
2096
|
+
/** Favicon URL (Atom icon / JSON Feed favicon). */
|
|
2097
|
+
favicon?: string;
|
|
2098
|
+
/** Copyright / rights notice. Omitted from JSON Feed. */
|
|
2099
|
+
copyright?: string;
|
|
2100
|
+
}
|
|
2101
|
+
/**
|
|
2102
|
+
* Opt-in RSS / Atom / JSON Feed files written during SSG.
|
|
2103
|
+
*
|
|
2104
|
+
* A single object is one default feed. A named record or array writes
|
|
2105
|
+
* multiple feeds with their own paths and channel metadata.
|
|
2106
|
+
*/
|
|
2107
|
+
type FeedsOptions = FeedChannelOptions | readonly FeedChannelOptions[] | {
|
|
2108
|
+
[name: string]: FeedChannelOptions;
|
|
2109
|
+
};
|
|
2110
|
+
/**
|
|
2111
|
+
* One resolved feed channel.
|
|
2112
|
+
*/
|
|
2113
|
+
interface ResolvedFeedChannel {
|
|
2114
|
+
name?: string;
|
|
2115
|
+
formats: readonly FeedFormat[];
|
|
2116
|
+
collection?: string;
|
|
2117
|
+
limit: number;
|
|
2118
|
+
path: string;
|
|
2119
|
+
title?: string;
|
|
2120
|
+
description?: string;
|
|
2121
|
+
language?: string;
|
|
2122
|
+
image?: string;
|
|
2123
|
+
favicon?: string;
|
|
2124
|
+
copyright?: string;
|
|
2125
|
+
}
|
|
2126
|
+
/**
|
|
2127
|
+
* Resolved feed options.
|
|
2128
|
+
*
|
|
2129
|
+
* Legacy `true` / single-object configs keep one channel on the top-level
|
|
2130
|
+
* fields. A named record or array also sets `feeds` to every channel.
|
|
2131
|
+
*/
|
|
2132
|
+
interface ResolvedFeedsOptions extends ResolvedFeedChannel {
|
|
2133
|
+
enabled: boolean;
|
|
2134
|
+
feeds?: ResolvedFeedChannel[];
|
|
2135
|
+
}
|
|
2136
|
+
/**
|
|
2137
|
+
* One person in the `blog.authors` map.
|
|
2138
|
+
*/
|
|
2139
|
+
interface BlogAuthor {
|
|
2140
|
+
/** Display name. Escaped in HTML. */
|
|
2141
|
+
name: string;
|
|
2142
|
+
/** Optional short bio. Escaped in HTML. */
|
|
2143
|
+
bio?: string;
|
|
2144
|
+
/** Profile URL. Only `https:` or a site-relative `/` path is emitted. */
|
|
2145
|
+
url?: string;
|
|
2146
|
+
}
|
|
2147
|
+
/**
|
|
2148
|
+
* Opt-in blog index, authors, tags, reading time, and archive.
|
|
2149
|
+
*/
|
|
2150
|
+
interface BlogOptions {
|
|
2151
|
+
/**
|
|
2152
|
+
* Named collection of posts. Defaults to a collection named `blog`, or
|
|
2153
|
+
* the only configured collection. Required when several collections exist
|
|
2154
|
+
* and none is named `blog`.
|
|
2155
|
+
*/
|
|
2156
|
+
collection?: string;
|
|
2157
|
+
/**
|
|
2158
|
+
* Author records keyed by the frontmatter `author` / `authors` value.
|
|
2159
|
+
* @default {}
|
|
2160
|
+
*/
|
|
2161
|
+
authors?: Record<string, BlogAuthor>;
|
|
2162
|
+
/**
|
|
2163
|
+
* Posts per index page, newest first.
|
|
2164
|
+
* @default 10
|
|
2165
|
+
*/
|
|
2166
|
+
pageSize?: number;
|
|
2167
|
+
/**
|
|
2168
|
+
* External RSS / Atom sources merged into the blog index at build time.
|
|
2169
|
+
* Empty / omitted fetches nothing. Only these URLs are requested.
|
|
2170
|
+
* @default []
|
|
2171
|
+
*/
|
|
2172
|
+
feeds?: Array<string | BlogFeedSource>;
|
|
2173
|
+
}
|
|
2174
|
+
/**
|
|
2175
|
+
* One configured external blog feed.
|
|
2176
|
+
*/
|
|
2177
|
+
interface BlogFeedSource {
|
|
2178
|
+
/** Absolute `https:` feed URL. */
|
|
2179
|
+
url: string;
|
|
2180
|
+
/** Default language applied when an item omits one. */
|
|
2181
|
+
language?: string;
|
|
2182
|
+
/** Default author applied when an item omits one. */
|
|
2183
|
+
author?: string;
|
|
2184
|
+
/**
|
|
2185
|
+
* Failed fetch / parse handling for this source.
|
|
2186
|
+
* `warn` skips the source. `error` fails the build after other sources run.
|
|
2187
|
+
* @default "warn"
|
|
2188
|
+
*/
|
|
2189
|
+
onError?: BlogFeedFailurePolicy;
|
|
2190
|
+
}
|
|
2191
|
+
/** How a failed external feed source is reported. */
|
|
2192
|
+
type BlogFeedFailurePolicy = "warn" | "error";
|
|
2193
|
+
/**
|
|
2194
|
+
* Resolved blog options.
|
|
2195
|
+
*/
|
|
2196
|
+
interface ResolvedBlogOptions {
|
|
2197
|
+
enabled: boolean;
|
|
2198
|
+
collection?: string;
|
|
2199
|
+
authors: Record<string, BlogAuthor>;
|
|
2200
|
+
pageSize: number;
|
|
2201
|
+
feeds: ResolvedBlogFeedSource[];
|
|
2202
|
+
}
|
|
2203
|
+
/**
|
|
2204
|
+
* Resolved external blog feed source.
|
|
2205
|
+
*/
|
|
2206
|
+
interface ResolvedBlogFeedSource {
|
|
2207
|
+
url: string;
|
|
2208
|
+
language?: string;
|
|
2209
|
+
author?: string;
|
|
2210
|
+
onError: BlogFeedFailurePolicy;
|
|
2211
|
+
}
|
|
2212
|
+
/**
|
|
2213
|
+
* Opt-in term list pages, per-term pages, and related-page lists.
|
|
2214
|
+
*/
|
|
2215
|
+
interface TaxonomiesOptions {
|
|
2216
|
+
/**
|
|
2217
|
+
* Frontmatter keys (and URL prefixes) to read terms from.
|
|
2218
|
+
* @default ["tags", "categories"]
|
|
2219
|
+
*/
|
|
2220
|
+
taxonomies?: string[];
|
|
2221
|
+
/**
|
|
2222
|
+
* Maximum related pages injected into a source page.
|
|
2223
|
+
* @default 5
|
|
2224
|
+
*/
|
|
2225
|
+
relatedLimit?: number;
|
|
2226
|
+
}
|
|
2227
|
+
/**
|
|
2228
|
+
* Resolved taxonomy options.
|
|
2229
|
+
*/
|
|
2230
|
+
interface ResolvedTaxonomiesOptions {
|
|
2231
|
+
enabled: boolean;
|
|
2232
|
+
taxonomies: string[];
|
|
2233
|
+
relatedLimit: number;
|
|
2234
|
+
}
|
|
2235
|
+
/** Banner shown on pages that belong to one documented version. */
|
|
2236
|
+
type VersionBannerKind = "unreleased" | "unmaintained";
|
|
2237
|
+
/**
|
|
2238
|
+
* One published or snapshot version of a docs tree.
|
|
2239
|
+
*/
|
|
2240
|
+
interface VersionEntry {
|
|
2241
|
+
/** Stable id used as `versions.current`. */
|
|
2242
|
+
id: string;
|
|
2243
|
+
/** Header label. Escaped before it is rendered. */
|
|
2244
|
+
label: string;
|
|
2245
|
+
/**
|
|
2246
|
+
* URL prefix without slashes (`"2.90"`, `"next"`). Empty string is the
|
|
2247
|
+
* site root.
|
|
2248
|
+
*/
|
|
2249
|
+
prefix: string;
|
|
2250
|
+
/**
|
|
2251
|
+
* Snapshot directory relative to the Vite root. Omitted entries use the
|
|
2252
|
+
* live `srcDir` and are not copied. Historical dirs are read-only.
|
|
2253
|
+
*/
|
|
2254
|
+
dir?: string;
|
|
2255
|
+
/** Optional status banner for pages in this version. */
|
|
2256
|
+
banner?: VersionBannerKind | false;
|
|
2257
|
+
}
|
|
2258
|
+
/**
|
|
2259
|
+
* Opt-in documentation versioning.
|
|
2260
|
+
*
|
|
2261
|
+
* Off by default. `true` enables a single current entry. An object enables
|
|
2262
|
+
* the feature and overrides only the fields you set.
|
|
2263
|
+
*/
|
|
2264
|
+
interface VersionsOptions {
|
|
2265
|
+
/** Id of the live tree being built from `srcDir`. */
|
|
2266
|
+
current?: string;
|
|
2267
|
+
/** Render the header version dropdown. @default true */
|
|
2268
|
+
switcher?: boolean;
|
|
2269
|
+
/** Show unreleased / unmaintained badges in the dropdown. @default true */
|
|
2270
|
+
badge?: boolean;
|
|
2271
|
+
/** Declared versions. Historical snapshots must set `dir`. */
|
|
2272
|
+
entries?: VersionEntry[];
|
|
2273
|
+
}
|
|
2274
|
+
/**
|
|
2275
|
+
* Resolved documentation versioning.
|
|
2276
|
+
*/
|
|
2277
|
+
interface ResolvedVersionsOptions {
|
|
2278
|
+
enabled: boolean;
|
|
2279
|
+
current: string;
|
|
2280
|
+
switcher: boolean;
|
|
2281
|
+
badge: boolean;
|
|
2282
|
+
entries: ResolvedVersionEntry[];
|
|
2283
|
+
}
|
|
2284
|
+
/**
|
|
2285
|
+
* One resolved version after prefix and banner sanitization.
|
|
2286
|
+
*/
|
|
2287
|
+
interface ResolvedVersionEntry {
|
|
2288
|
+
id: string;
|
|
2289
|
+
label: string;
|
|
2290
|
+
prefix: string;
|
|
2291
|
+
dir?: string;
|
|
2292
|
+
banner: VersionBannerKind | false;
|
|
2293
|
+
}
|
|
2294
|
+
/**
|
|
2295
|
+
* Options for the core `oxContent()` Vite plugin.
|
|
2296
|
+
*
|
|
2297
|
+
* The top-level options describe where content lives, which Markdown features
|
|
2298
|
+
* are enabled, and which build-time features should run. Feature toggles that
|
|
2299
|
+
* accept `boolean | Options` follow the same convention:
|
|
2300
|
+
*
|
|
2301
|
+
* - `false` disables the feature.
|
|
2302
|
+
* - `true` enables the feature with its documented defaults.
|
|
2303
|
+
* - an object enables the feature and overrides only the provided fields.
|
|
2304
|
+
*/
|
|
2305
|
+
interface OxContentOptions {
|
|
2306
|
+
/**
|
|
2307
|
+
* Directory containing Markdown source files.
|
|
2308
|
+
*
|
|
2309
|
+
* The path is resolved from the Vite project root. SSG, search indexing, and
|
|
2310
|
+
* dev-server routing all use this directory as the content root.
|
|
2311
|
+
*
|
|
2312
|
+
* @default 'content'
|
|
2313
|
+
*/
|
|
2314
|
+
srcDir?: string;
|
|
2315
|
+
/**
|
|
2316
|
+
* Directory where generated files are written.
|
|
2317
|
+
*
|
|
2318
|
+
* SSG HTML, search indexes, and generated assets are emitted under this
|
|
2319
|
+
* directory during production builds.
|
|
2320
|
+
*
|
|
2321
|
+
* @default 'dist'
|
|
2322
|
+
*/
|
|
2323
|
+
outDir?: string;
|
|
2324
|
+
/**
|
|
2325
|
+
* Base path prepended to generated internal URLs.
|
|
2326
|
+
*
|
|
2327
|
+
* Use this when the site is deployed below a sub-path, such as GitHub Pages or
|
|
2328
|
+
* a documentation route inside a larger application.
|
|
2329
|
+
*
|
|
2330
|
+
* @default '/'
|
|
2331
|
+
*/
|
|
2332
|
+
base?: string;
|
|
2333
|
+
/**
|
|
2334
|
+
* Markdown-like file extensions to process.
|
|
2335
|
+
*
|
|
2336
|
+
* Extensions are normalized with a leading dot and matched case-insensitively.
|
|
2337
|
+
* Add custom extensions when another authoring format is compiled to Markdown
|
|
2338
|
+
* before ox-content sees it.
|
|
2339
|
+
*
|
|
2340
|
+
* @default ['.md', '.markdown', '.mdx']
|
|
2341
|
+
*/
|
|
2342
|
+
extensions?: string[];
|
|
2343
|
+
/**
|
|
2344
|
+
* Static Site Generation options.
|
|
2345
|
+
*
|
|
2346
|
+
* Passing `true` or omitting this option enables SSG with defaults. Passing
|
|
2347
|
+
* `false` disables the SSG plugin while still allowing Markdown module
|
|
2348
|
+
* transforms to run.
|
|
2349
|
+
*
|
|
2350
|
+
* @default { enabled: true }
|
|
2351
|
+
*/
|
|
2352
|
+
ssg?: SsgOptions | boolean;
|
|
2353
|
+
/**
|
|
2354
|
+
* Write crawl manifests next to generated HTML.
|
|
2355
|
+
*
|
|
2356
|
+
* Off by default. `true` writes `sitemap.xml`, `robots.txt`, and `llms.txt`.
|
|
2357
|
+
* An object enables the feature and overrides only the fields you set.
|
|
2358
|
+
* Requires `ssg.siteUrl`. When that is missing the build continues and a
|
|
2359
|
+
* warning is emitted instead of writing files.
|
|
2360
|
+
*
|
|
2361
|
+
* @default false
|
|
2362
|
+
*/
|
|
2363
|
+
siteMaps?: boolean | SiteMapsOptions;
|
|
2364
|
+
/**
|
|
2365
|
+
* Honor frontmatter draft / unlisted / scheduled publish states.
|
|
2366
|
+
*
|
|
2367
|
+
* Off by default. `true` omits drafts and future-scheduled pages from
|
|
2368
|
+
* production HTML, search, and sitemaps. Unlisted pages still build and
|
|
2369
|
+
* remain reachable by URL. An object enables the feature and can inject
|
|
2370
|
+
* `now` for a deterministic build-time clock.
|
|
2371
|
+
*
|
|
2372
|
+
* @default false
|
|
2373
|
+
*/
|
|
2374
|
+
publishState?: boolean | PublishStateOptions;
|
|
2375
|
+
/**
|
|
2376
|
+
* Honor frontmatter `permalink` / `slug` when resolving page URLs.
|
|
2377
|
+
*
|
|
2378
|
+
* Off by default. `true` or `{}` replaces the file-tree URL with
|
|
2379
|
+
* `permalink`, or the last path segment with `slug`. Path escape
|
|
2380
|
+
* (`../`, absolute filesystem paths, `javascript:`, protocol-relative
|
|
2381
|
+
* `//`) is rejected and the file-tree URL is kept. Two pages that
|
|
2382
|
+
* resolve to the same URL produce an error; the first page is kept and
|
|
2383
|
+
* the later page is skipped.
|
|
2384
|
+
*
|
|
2385
|
+
* @default false
|
|
2386
|
+
*/
|
|
2387
|
+
permalinks?: boolean | PermalinksOptions;
|
|
2388
|
+
/**
|
|
2389
|
+
* Inherit missing frontmatter keys from ancestor `_index` files.
|
|
2390
|
+
*
|
|
2391
|
+
* Off by default. `true` or `{}` fills keys a child does not set.
|
|
2392
|
+
* `permalink` and `slug` are never inherited.
|
|
2393
|
+
*
|
|
2394
|
+
* @default false
|
|
2395
|
+
*/
|
|
2396
|
+
cascade?: boolean | CascadeOptions;
|
|
2397
|
+
/**
|
|
2398
|
+
* Write static HTML redirect pages for frontmatter aliases and a config map.
|
|
2399
|
+
*
|
|
2400
|
+
* Off by default. `true` or `{}` enables empty defaults. A path map such as
|
|
2401
|
+
* `{ "/old-guide": "/guide" }` enables the feature with that map. Destinations
|
|
2402
|
+
* must be same-origin paths (`/` but not `//`) unless `allowExternal` is set.
|
|
2403
|
+
* `javascript:`, `data:`, and protocol-relative URLs are ignored.
|
|
2404
|
+
* Overlapping sources last-win after trailing slashes are folded.
|
|
2405
|
+
*
|
|
2406
|
+
* @default false
|
|
2407
|
+
*/
|
|
2408
|
+
redirects?: boolean | RedirectsOptions | Record<string, string>;
|
|
2409
|
+
/**
|
|
2410
|
+
* Write a paginated blog index, tag pages, and yearly/monthly archive,
|
|
2411
|
+
* and inject author / reading-time chrome on posts.
|
|
2412
|
+
*
|
|
2413
|
+
* Off by default. `true` uses the `blog` collection when it exists,
|
|
2414
|
+
* otherwise the only configured collection, with pageSize 10.
|
|
2415
|
+
* An object enables the feature and overrides only the fields you set.
|
|
2416
|
+
* Also accepted as `ssg.blog`; the top-level option wins when both are set.
|
|
2417
|
+
*
|
|
2418
|
+
* @default false
|
|
2419
|
+
*/
|
|
2420
|
+
blog?: boolean | BlogOptions;
|
|
2421
|
+
/**
|
|
2422
|
+
* Write RSS, Atom, and/or JSON Feed files from a named collection.
|
|
2423
|
+
*
|
|
2424
|
+
* Off by default. `true` writes all three formats from the `content`
|
|
2425
|
+
* collection (or the first configured collection) with a 20-item limit.
|
|
2426
|
+
* An object enables the feature and overrides only the fields you set.
|
|
2427
|
+
* Requires `ssg.siteUrl`. When that is missing the build continues and a
|
|
2428
|
+
* warning is emitted instead of writing files.
|
|
2429
|
+
*
|
|
2430
|
+
* @default false
|
|
2431
|
+
*/
|
|
2432
|
+
feeds?: boolean | FeedsOptions;
|
|
2433
|
+
/**
|
|
2434
|
+
* Write a web app manifest and an optional service worker.
|
|
2435
|
+
*
|
|
2436
|
+
* Off by default. `true` writes `manifest.webmanifest` and `sw.js`, and
|
|
2437
|
+
* injects a tiny client script that registers the worker on themed pages.
|
|
2438
|
+
* An object enables the feature and can set `offline: false` to keep the
|
|
2439
|
+
* manifest without caching or that script. This adds client JavaScript
|
|
2440
|
+
* when offline is on. Requires `ssg.siteUrl`. When that is missing the
|
|
2441
|
+
* build continues and a warning is emitted instead of writing files.
|
|
2442
|
+
*
|
|
2443
|
+
* @default false
|
|
2444
|
+
*/
|
|
2445
|
+
pwa?: boolean | PwaOptions;
|
|
2446
|
+
/**
|
|
2447
|
+
* Generate self-hosted Iconify CSS for used and safelisted icons.
|
|
2448
|
+
*
|
|
2449
|
+
* Off by default. `true` or `{}` enables CSS-mask emission. Install
|
|
2450
|
+
* `@iconify/json` or individual `@iconify-json/*` packages so the build
|
|
2451
|
+
* can resolve collections without a network request.
|
|
2452
|
+
*
|
|
2453
|
+
* @default false
|
|
2454
|
+
*/
|
|
2455
|
+
icons?: boolean | IconsOptions;
|
|
2456
|
+
/**
|
|
2457
|
+
* Write tag/category term pages and inject related-page lists.
|
|
2458
|
+
*
|
|
2459
|
+
* Off by default. `true` reads frontmatter `tags` and `categories` and
|
|
2460
|
+
* writes list pages, per-term pages, and up to 5 related links on pages
|
|
2461
|
+
* that share a term. An object enables the feature and overrides only
|
|
2462
|
+
* the fields you set. Term slugs are `[a-z0-9-]` and every label is
|
|
2463
|
+
* HTML-escaped.
|
|
2464
|
+
*
|
|
2465
|
+
* @default false
|
|
2466
|
+
*/
|
|
2467
|
+
taxonomies?: boolean | TaxonomiesOptions;
|
|
2468
|
+
/**
|
|
2469
|
+
* Prefix live docs, emit frozen snapshot trees, and render a header
|
|
2470
|
+
* version dropdown.
|
|
2471
|
+
*
|
|
2472
|
+
* Off by default. `true` enables a single current entry. An object
|
|
2473
|
+
* enables the feature and lists additional versions. Historical
|
|
2474
|
+
* snapshot directories are read, never rewritten.
|
|
2475
|
+
*
|
|
2476
|
+
* @default false
|
|
2477
|
+
*/
|
|
2478
|
+
versions?: boolean | VersionsOptions;
|
|
2479
|
+
/**
|
|
2480
|
+
* Enable GitHub Flavored Markdown extensions.
|
|
2481
|
+
* @default true
|
|
2482
|
+
*/
|
|
2483
|
+
gfm?: boolean;
|
|
2484
|
+
/**
|
|
2485
|
+
* Enable MDX JSX, ESM, and expressions.
|
|
2486
|
+
*
|
|
2487
|
+
* When omitted, MDX is enabled for `.mdx` files only. Set `true` to enable
|
|
2488
|
+
* it for every configured extension or `false` to keep `.mdx` on the plain
|
|
2489
|
+
* Markdown path.
|
|
2490
|
+
* @default inferred from the source extension
|
|
2491
|
+
*/
|
|
2492
|
+
mdx?: boolean;
|
|
2493
|
+
/**
|
|
2494
|
+
* Enable footnotes.
|
|
2495
|
+
* @default true
|
|
2496
|
+
*/
|
|
2497
|
+
footnotes?: boolean;
|
|
2498
|
+
/**
|
|
2499
|
+
* Render footnotes as a semantic ordered section with numeric markers.
|
|
2500
|
+
*
|
|
2501
|
+
* Source identifiers are used only for lookup and slugs. Visible markers
|
|
2502
|
+
* are 1, 2, … in document order, and definitions emit as
|
|
2503
|
+
* `<section class="footnotes"><ol><li>…`.
|
|
2504
|
+
*
|
|
2505
|
+
* Off by default so current alpha HTML stays stable.
|
|
2506
|
+
* @default false
|
|
2507
|
+
*/
|
|
2508
|
+
semanticFootnotes?: boolean;
|
|
2509
|
+
/**
|
|
2510
|
+
* Enable tables.
|
|
2511
|
+
* @default true
|
|
2512
|
+
*/
|
|
2513
|
+
tables?: boolean;
|
|
2514
|
+
/**
|
|
2515
|
+
* Enable task lists.
|
|
2516
|
+
* @default true
|
|
2517
|
+
*/
|
|
2518
|
+
taskLists?: boolean;
|
|
2519
|
+
/**
|
|
2520
|
+
* Enable strikethrough.
|
|
2521
|
+
* @default true
|
|
2522
|
+
*/
|
|
2523
|
+
strikethrough?: boolean;
|
|
2524
|
+
/**
|
|
2525
|
+
* Enable GFM autolinks and linkify bare URLs.
|
|
2526
|
+
* @default true
|
|
2527
|
+
*/
|
|
2528
|
+
autolinks?: boolean;
|
|
2529
|
+
/**
|
|
2530
|
+
* Enable syntax highlighting for code blocks.
|
|
2531
|
+
*
|
|
2532
|
+
* When true, fenced and language-tagged inline code is highlighted with the
|
|
2533
|
+
* native tree-sitter engine. Token colors are `--octc-syntax-*` custom
|
|
2534
|
+
* properties so theme-color packages resolve highlighting. Languages with no
|
|
2535
|
+
* native grammar stay unhighlighted.
|
|
2536
|
+
*
|
|
2537
|
+
* @default false
|
|
2538
|
+
*/
|
|
2539
|
+
highlight?: boolean;
|
|
2540
|
+
/**
|
|
2541
|
+
* Code block line annotations for fenced code blocks.
|
|
2542
|
+
*
|
|
2543
|
+
* This feature is opt-in because it changes rendered code-block markup. Pass
|
|
2544
|
+
* `true` to enable ox-content's attribute syntax, or pass an options object to
|
|
2545
|
+
* change the meta key or enable VitePress-compatible notation.
|
|
2546
|
+
*
|
|
2547
|
+
* @example
|
|
2548
|
+
* ~~~md
|
|
2549
|
+
* ```ts annotate="highlight:1,3-4;warning:6;error:7"
|
|
2550
|
+
* const value = compute()
|
|
2551
|
+
* ```
|
|
2552
|
+
* ~~~
|
|
2553
|
+
*
|
|
2554
|
+
* @default false
|
|
2555
|
+
*/
|
|
2556
|
+
codeAnnotations?: boolean | CodeAnnotationsOptions;
|
|
2557
|
+
/**
|
|
2558
|
+
* Expand Obsidian-style `[[page]]` and `[[page|label]]` links.
|
|
2559
|
+
*
|
|
2560
|
+
* Use this for knowledge-base style content where authors prefer short,
|
|
2561
|
+
* document-relative link syntax. Pass an object to override the base URL used
|
|
2562
|
+
* when resolving generated hrefs.
|
|
2563
|
+
*
|
|
2564
|
+
* @default false
|
|
2565
|
+
*/
|
|
2566
|
+
wikiLinks?: boolean | WikiLinkOptions;
|
|
2567
|
+
/**
|
|
2568
|
+
* Expand `:shortcode:` emoji aliases to Unicode.
|
|
2569
|
+
*
|
|
2570
|
+
* Built-in aliases cover common emoji names. Provide `custom` entries for
|
|
2571
|
+
* project-specific aliases or to override a built-in mapping.
|
|
2572
|
+
*
|
|
2573
|
+
* @default false
|
|
2574
|
+
*/
|
|
2575
|
+
emojiShortcodes?: boolean | EmojiShortcodeOptions;
|
|
2576
|
+
/**
|
|
2577
|
+
* Enable markdown-it-attrs style `{#id .class key=value}` attributes.
|
|
2578
|
+
*
|
|
2579
|
+
* Attribute blocks can be attached to headings, paragraphs, links, images, and
|
|
2580
|
+
* other supported Markdown nodes depending on parser context.
|
|
2581
|
+
*
|
|
2582
|
+
* @default false
|
|
2583
|
+
*/
|
|
2584
|
+
attrs?: boolean | AttrsOptions;
|
|
2585
|
+
/**
|
|
2586
|
+
* Opt-in `{badge:variant}` inline badges.
|
|
2587
|
+
*
|
|
2588
|
+
* Passing `true` or an options object enables the built-in variants.
|
|
2589
|
+
* Badge text is HTML-escaped. Fenced, indented, and inline code are skipped.
|
|
2590
|
+
*
|
|
2591
|
+
* @default false
|
|
2592
|
+
*/
|
|
2593
|
+
badges?: boolean | BadgeOptions;
|
|
2594
|
+
/**
|
|
2595
|
+
* Opt-in `<NotByAI />` authorship disclosure badge.
|
|
2596
|
+
*
|
|
2597
|
+
* Passing `true` or an options object emits the official Not By AI light/dark
|
|
2598
|
+
* artwork as static HTML. This is not a status badge — see `badges` for
|
|
2599
|
+
* `{badge:tip}` labels. Disabled when omitted. Fenced, indented, and inline
|
|
2600
|
+
* code plus HTML comments are skipped.
|
|
2601
|
+
*
|
|
2602
|
+
* @default false
|
|
2603
|
+
*/
|
|
2604
|
+
notByAi?: boolean | NotByAiOptions;
|
|
2605
|
+
/**
|
|
2606
|
+
* Opt-in `{kbd:...}` inline keyboard keys.
|
|
2607
|
+
*
|
|
2608
|
+
* Passing `true` or an options object enables `{kbd:Ctrl+K}` and
|
|
2609
|
+
* `{kbd:Cmd Shift P}`. Key labels are HTML-escaped. Fenced, indented,
|
|
2610
|
+
* inline, and raw code, plus HTML comments, are skipped. Aliases come
|
|
2611
|
+
* from build config, not the runtime user agent.
|
|
2612
|
+
*
|
|
2613
|
+
* @default false
|
|
2614
|
+
*/
|
|
2615
|
+
keyboardKeys?: boolean | KeyboardKeysOptions;
|
|
2616
|
+
/**
|
|
2617
|
+
* Opt-in abbreviation and glossary expansion.
|
|
2618
|
+
*
|
|
2619
|
+
* Passing `true` or an options object expands `*[LSP]: Language Server Protocol`
|
|
2620
|
+
* and config `terms` into `<abbr class="ox-abbr">`. Matching uses Unicode word
|
|
2621
|
+
* boundaries. Fenced, indented, inline, and raw code, HTML comments, and
|
|
2622
|
+
* existing links are skipped. There is no client JavaScript.
|
|
2623
|
+
*
|
|
2624
|
+
* @default false
|
|
2625
|
+
*/
|
|
2626
|
+
abbreviations?: boolean | AbbreviationsOptions;
|
|
2627
|
+
/**
|
|
2628
|
+
* Opt-in PHP Markdown Extra / mdBook-style definition lists.
|
|
2629
|
+
*
|
|
2630
|
+
* Passing `true` or an options object turns
|
|
2631
|
+
* `Term` / `: definition` source into semantic `<dl>` markup.
|
|
2632
|
+
* Disabled when omitted. Fenced, indented, and inline code are skipped.
|
|
2633
|
+
* Invalid or ambiguous forms stay ordinary paragraphs or lists.
|
|
2634
|
+
*
|
|
2635
|
+
* @default false
|
|
2636
|
+
*/
|
|
2637
|
+
definitionLists?: boolean | DefinitionListOptions;
|
|
2638
|
+
/**
|
|
2639
|
+
* Opt-in `{link:...}` rich magic links.
|
|
2640
|
+
*
|
|
2641
|
+
* Passing `true` or an options object enables GitHub-user, alias, and
|
|
2642
|
+
* explicit `label|url` forms. Attributes and text are HTML-escaped.
|
|
2643
|
+
* Fenced, indented, inline, and raw code, plus already-linked text, are
|
|
2644
|
+
* skipped. The transform does not make network requests unless an explicit
|
|
2645
|
+
* favicon template is enabled (still URL-only; no fetch at transform time).
|
|
2646
|
+
*
|
|
2647
|
+
* @default false
|
|
2648
|
+
*/
|
|
2649
|
+
magicLinks?: boolean | MagicLinkOptions;
|
|
2650
|
+
/**
|
|
2651
|
+
* Opt-in `::: tip` custom containers.
|
|
2652
|
+
*
|
|
2653
|
+
* GitHub-style `> [!NOTE]` callouts stay available without this option.
|
|
2654
|
+
* Passing `true` enables the built-in types. Pass an object to register extra
|
|
2655
|
+
* types or override titles.
|
|
2656
|
+
*
|
|
2657
|
+
* @default false
|
|
2658
|
+
*/
|
|
2659
|
+
containers?: boolean | ContainerOptions;
|
|
2660
|
+
/**
|
|
2661
|
+
* Opt-in figures, captions, and lazy-loaded images.
|
|
2662
|
+
*
|
|
2663
|
+
* Title text becomes a `<figcaption>`. Optional `{width=N height=M}` on the
|
|
2664
|
+
* image is consumed by this feature and does not require `attrs`. Passing
|
|
2665
|
+
* `true` or `{}` enables defaults (`lazy: true`).
|
|
2666
|
+
*
|
|
2667
|
+
* @default false
|
|
2668
|
+
*/
|
|
2669
|
+
images?: boolean | ImageOptions;
|
|
2670
|
+
/**
|
|
2671
|
+
* Opt-in static `::: gallery` image groups.
|
|
2672
|
+
*
|
|
2673
|
+
* Each non-empty line inside the block must be a Markdown image, optionally
|
|
2674
|
+
* as a list item. Image titles become item captions, and the block title or
|
|
2675
|
+
* caption metadata becomes the gallery caption. Passing `true` or `{}`
|
|
2676
|
+
* enables strict empty-gallery and missing-alt diagnostics.
|
|
2677
|
+
*
|
|
2678
|
+
* @default false
|
|
2679
|
+
*/
|
|
2680
|
+
imageGalleries?: boolean | ImageGalleryOptions;
|
|
2681
|
+
/**
|
|
2682
|
+
* Opt-in static `::: timeline` milestone lists.
|
|
2683
|
+
*
|
|
2684
|
+
* Timeline blocks render dated or undated milestones from Markdown-only
|
|
2685
|
+
* `::: timeline` blocks. Items can carry `status`, `label`, and `href`
|
|
2686
|
+
* metadata while nested Markdown stays searchable and static.
|
|
2687
|
+
*
|
|
2688
|
+
* @default false
|
|
2689
|
+
*/
|
|
2690
|
+
timelines?: boolean | TimelineOptions;
|
|
2691
|
+
/**
|
|
2692
|
+
* Opt-in page-bundle resources and build-time image processing.
|
|
2693
|
+
*
|
|
2694
|
+
* Off by default. `true` or `{}` treats each page directory as a bundle:
|
|
2695
|
+
* sibling images are addressable with relative URLs. Query-string
|
|
2696
|
+
* resize/crop/format transforms run at build time and are cached by
|
|
2697
|
+
* source mtime plus transform params. Paths that leave the page
|
|
2698
|
+
* directory or `srcDir` are rejected. Missing sources fail the build
|
|
2699
|
+
* when `missing` is `"error"` (the default when enabled).
|
|
2700
|
+
* `dedupe` is off unless set; it does not turn on with `true` / `{}`.
|
|
2701
|
+
*
|
|
2702
|
+
* This is separate from `images`, which only adds figures, captions,
|
|
2703
|
+
* and lazy-loading.
|
|
2704
|
+
*
|
|
2705
|
+
* @default false
|
|
2706
|
+
*/
|
|
2707
|
+
resources?: boolean | ResourcesOptions;
|
|
2708
|
+
/**
|
|
2709
|
+
* Import source snippets into fences with `<<< @/path/to/file.ts{region}`.
|
|
2710
|
+
*
|
|
2711
|
+
* This is useful for documentation that must stay synchronized with examples
|
|
2712
|
+
* in the repository. Use `rootDir` when snippets should resolve from a
|
|
2713
|
+
* directory other than the Vite project root.
|
|
2714
|
+
*
|
|
2715
|
+
* @default false
|
|
2716
|
+
*/
|
|
2717
|
+
codeImports?: boolean | CodeImportOptions;
|
|
2718
|
+
/**
|
|
2719
|
+
* Inline another Markdown file with `<!-- @include: ./path.md -->`.
|
|
2720
|
+
*
|
|
2721
|
+
* Expansion happens before Markdown is parsed, so included headings and
|
|
2722
|
+
* lists become part of the host document. Relative paths resolve from the
|
|
2723
|
+
* current file. `@/` and `/` resolve from `rootDir`. Paths outside
|
|
2724
|
+
* `rootDir` are rejected and reported as transform errors.
|
|
2725
|
+
*
|
|
2726
|
+
* @default false
|
|
2727
|
+
*/
|
|
2728
|
+
includes?: boolean | IncludeOptions;
|
|
2729
|
+
/**
|
|
2730
|
+
* Inline a parameterized Markdown partial with
|
|
2731
|
+
* `<!-- @partial: ./_partials/install.md package="ox-content" -->`.
|
|
2732
|
+
*
|
|
2733
|
+
* Disabled when omitted. `{{ name }}` substitutions are HTML-escaped.
|
|
2734
|
+
* Missing parameters stay literal unless `missing` is `"error"`. Existing
|
|
2735
|
+
* `<!-- @include: -->` behavior is unchanged.
|
|
2736
|
+
*
|
|
2737
|
+
* @default false
|
|
2738
|
+
*/
|
|
2739
|
+
partials?: boolean | PartialsOptions;
|
|
2740
|
+
/**
|
|
2741
|
+
* Opt-in `::: card` / `::: link-card` / `::: card-grid` blocks.
|
|
2742
|
+
*
|
|
2743
|
+
* Passing `true` enables the defaults. Pass an object to keep the option
|
|
2744
|
+
* shape while overriding `enabled`.
|
|
2745
|
+
*
|
|
2746
|
+
* @default false
|
|
2747
|
+
*/
|
|
2748
|
+
cards?: boolean | CardOptions;
|
|
2749
|
+
/**
|
|
2750
|
+
* Restyle a `::: steps` wrapper around an ordered list.
|
|
2751
|
+
*
|
|
2752
|
+
* Disabled when omitted or `false`. `true` and `{}` enable the default
|
|
2753
|
+
* step-list markup. Ordinary ordered lists outside `::: steps` are unchanged.
|
|
2754
|
+
*
|
|
2755
|
+
* @default false
|
|
2756
|
+
*/
|
|
2757
|
+
steps?: boolean | StepsOptions;
|
|
2758
|
+
/**
|
|
2759
|
+
* Opt-in VitePress-style `::: code-group` fence groups.
|
|
2760
|
+
*
|
|
2761
|
+
* Passing `true` or `{}` enables rewriting labeled fences into the
|
|
2762
|
+
* existing no-JS tab widget. Omitted or `false` leaves the source on
|
|
2763
|
+
* the normal Markdown/container path.
|
|
2764
|
+
*
|
|
2765
|
+
* @default false
|
|
2766
|
+
*/
|
|
2767
|
+
codeGroups?: boolean | CodeGroupOptions;
|
|
2768
|
+
/**
|
|
2769
|
+
* Opt-in static directory trees from `file-tree` fences.
|
|
2770
|
+
*
|
|
2771
|
+
* Passing `true` or `{}` enables the transform. Names are escaped and never
|
|
2772
|
+
* read from the filesystem. Directories with children open and close with
|
|
2773
|
+
* `<details>`. Icons are on by default and can be replaced from site config.
|
|
2774
|
+
*
|
|
2775
|
+
* @default false
|
|
2776
|
+
*/
|
|
2777
|
+
fileTree?: boolean | FileTreeOptions;
|
|
2778
|
+
/**
|
|
2779
|
+
* Opt-in static tables from `csv-table` / `json-table` fences.
|
|
2780
|
+
*
|
|
2781
|
+
* Passing `true` or `{}` enables the transform. Inline CSV/JSON becomes a
|
|
2782
|
+
* semantic `<table>` with a responsive wrapper. `src` or a single path body
|
|
2783
|
+
* can import `@/data/options.csv` or `./options.json`. Paths cannot escape
|
|
2784
|
+
* the content/project root with `..`. Missing imports use `missing`.
|
|
2785
|
+
*
|
|
2786
|
+
* @default false
|
|
2787
|
+
*/
|
|
2788
|
+
dataTables?: boolean | DataTableOptions;
|
|
2789
|
+
/**
|
|
2790
|
+
* Sanitize rendered HTML with safe defaults or explicit allow lists.
|
|
2791
|
+
*
|
|
2792
|
+
* Enable this for untrusted Markdown. The default allow lists are conservative;
|
|
2793
|
+
* pass an options object only when the content model intentionally needs extra
|
|
2794
|
+
* tags, attributes, or URL schemes.
|
|
2795
|
+
*
|
|
2796
|
+
* @default false
|
|
2797
|
+
*/
|
|
2798
|
+
sanitize?: boolean | SanitizeOptions;
|
|
2799
|
+
/**
|
|
2800
|
+
* Append an "edit this page" link to rendered Markdown.
|
|
2801
|
+
*
|
|
2802
|
+
* The feature is enabled only when `repoUrl` is provided in the options object.
|
|
2803
|
+
* Passing `true` keeps the feature disabled because there is not enough
|
|
2804
|
+
* repository information to generate valid links.
|
|
2805
|
+
*
|
|
2806
|
+
* @default false
|
|
2807
|
+
*/
|
|
2808
|
+
editThisPage?: boolean | EditThisPageOptions;
|
|
2809
|
+
/**
|
|
2810
|
+
* Recognize emphasis adjacent to CJK text. The native parser already supports
|
|
2811
|
+
* this behavior; the option documents the compatibility contract.
|
|
2812
|
+
* @default false
|
|
2813
|
+
*/
|
|
2814
|
+
cjkEmphasis?: boolean;
|
|
2815
|
+
/**
|
|
2816
|
+
* Lint fenced code blocks during Markdown transforms.
|
|
2817
|
+
*
|
|
2818
|
+
* Use this as a lightweight authoring check for missing languages or trailing
|
|
2819
|
+
* whitespace inside fences. For project-wide linting, prefer the exported
|
|
2820
|
+
* `lintCodeBlocks()` helper or the Markdown lint APIs.
|
|
2821
|
+
*
|
|
2822
|
+
* @default false
|
|
2823
|
+
*/
|
|
2824
|
+
codeBlockLint?: boolean | CodeBlockLintOptions;
|
|
2825
|
+
/**
|
|
2826
|
+
* Type-check TypeScript/TSX code fences via tsgo.
|
|
2827
|
+
*
|
|
2828
|
+
* By default only fences with explicit opt-in metadata are checked. This keeps
|
|
2829
|
+
* incidental examples cheap while allowing docs-as-code snippets to fail the
|
|
2830
|
+
* build when configured with `mode: 'error'`.
|
|
2831
|
+
*
|
|
2832
|
+
* @default false
|
|
2833
|
+
*/
|
|
2834
|
+
codeBlockTypecheck?: boolean | CodeBlockTypecheckOptions;
|
|
2835
|
+
/**
|
|
2836
|
+
* Attach build-time TypeScript hover overlays to opted-in fences.
|
|
2837
|
+
*
|
|
2838
|
+
* Off by default. `true` or `{}` enables the feature. Only `ts` / `tsx`
|
|
2839
|
+
* fences tagged `twoslash` receive payloads. Types are generated during
|
|
2840
|
+
* the Markdown transform; no TypeScript compiler is shipped to the browser.
|
|
2841
|
+
*
|
|
2842
|
+
* @default false
|
|
2843
|
+
*/
|
|
2844
|
+
typedHover?: boolean | TypedHoverOptions;
|
|
2845
|
+
/**
|
|
2846
|
+
* Extract runnable fenced examples for Vitest docs-as-tests harnesses.
|
|
2847
|
+
*
|
|
2848
|
+
* Collected examples can be written by the docs test helpers and executed as
|
|
2849
|
+
* part of a normal Vitest suite.
|
|
2850
|
+
*
|
|
2851
|
+
* @default false
|
|
2852
|
+
*/
|
|
2853
|
+
docsTests?: boolean | DocsTestOptions;
|
|
2854
|
+
/**
|
|
2855
|
+
* Enable mermaid diagram rendering.
|
|
2856
|
+
* @default false
|
|
2857
|
+
*/
|
|
2858
|
+
mermaid?: boolean;
|
|
2859
|
+
/**
|
|
2860
|
+
* Enable `$…$` inline and `$$…$$` block math.
|
|
2861
|
+
*
|
|
2862
|
+
* Currency-like `$` runs, fenced code, indented code, and inline code stay
|
|
2863
|
+
* literal. TeX is HTML-escaped into accessible MathML `mtext`.
|
|
2864
|
+
*
|
|
2865
|
+
* @default false
|
|
2866
|
+
*/
|
|
2867
|
+
math?: boolean | MathOptions;
|
|
2868
|
+
/**
|
|
2869
|
+
* Parse YAML frontmatter.
|
|
2870
|
+
* @default true
|
|
2871
|
+
*/
|
|
2872
|
+
frontmatter?: boolean;
|
|
2873
|
+
/**
|
|
2874
|
+
* Generate table of contents.
|
|
2875
|
+
* @default true
|
|
2876
|
+
*/
|
|
2877
|
+
toc?: boolean;
|
|
2878
|
+
/**
|
|
2879
|
+
* Maximum heading depth for TOC.
|
|
2880
|
+
* @default 3
|
|
2881
|
+
*/
|
|
2882
|
+
tocMaxDepth?: number;
|
|
2883
|
+
/**
|
|
2884
|
+
* Append a visible heading permalink (`<a class="header-anchor" href="#id">`).
|
|
2885
|
+
*
|
|
2886
|
+
* Reuses the generated heading id. Default off. Theme
|
|
2887
|
+
* `headingPermalink: "hover" | "always"` changes only CSS visibility.
|
|
2888
|
+
*
|
|
2889
|
+
* @default false
|
|
2890
|
+
*/
|
|
2891
|
+
headingPermalinks?: boolean | HeadingPermalinksOptions;
|
|
2892
|
+
/**
|
|
2893
|
+
* Enable OG image generation.
|
|
2894
|
+
* @default false
|
|
2895
|
+
*/
|
|
2896
|
+
ogImage?: boolean;
|
|
2897
|
+
/**
|
|
2898
|
+
* OG image generation options.
|
|
2899
|
+
* Ignored unless `ogImage` or `ssg.generateOgImage` is enabled.
|
|
2900
|
+
* @default { vuePlugin: 'vitejs', width: 1200, height: 630, cache: true, concurrency: 1 }
|
|
2901
|
+
*/
|
|
2902
|
+
ogImageOptions?: OgImageOptions;
|
|
2903
|
+
/**
|
|
2904
|
+
* Custom AST transformers.
|
|
2905
|
+
* Transformers run after parsing and before the final JavaScript module is emitted.
|
|
2906
|
+
* @default []
|
|
2907
|
+
*/
|
|
2908
|
+
transformers?: MarkdownTransformer[];
|
|
2909
|
+
/**
|
|
2910
|
+
* Source documentation generation options.
|
|
2911
|
+
* Set to false to disable (opt-out).
|
|
2912
|
+
* @default { enabled: true }
|
|
2913
|
+
*/
|
|
2914
|
+
docs?: DocsOptions | false;
|
|
2915
|
+
/**
|
|
2916
|
+
* Full-text search options.
|
|
2917
|
+
* Set to false to disable search.
|
|
2918
|
+
* @default { enabled: true }
|
|
2919
|
+
*/
|
|
2920
|
+
search?: SearchOptions | boolean;
|
|
2921
|
+
/**
|
|
2922
|
+
* Markdown collection query options.
|
|
2923
|
+
*
|
|
2924
|
+
* Collections are exposed through `virtual:ox-content/collections`. The
|
|
1439
2925
|
* default collection is metadata-only and is built by the native Rust
|
|
1440
2926
|
* manifest builder without rendering every document; add `include` fields
|
|
1441
2927
|
* only for routes that need raw or rendered content in the query payload.
|
|
1442
2928
|
*
|
|
1443
|
-
* @default content collection for all Markdown files
|
|
2929
|
+
* @default content collection for all Markdown files
|
|
2930
|
+
*/
|
|
2931
|
+
collections?: CollectionsOptions | boolean;
|
|
2932
|
+
/**
|
|
2933
|
+
* Enable OG Viewer dev tool.
|
|
2934
|
+
* Accessible at /__og-viewer during development.
|
|
2935
|
+
* @default true
|
|
2936
|
+
*/
|
|
2937
|
+
ogViewer?: boolean;
|
|
2938
|
+
/**
|
|
2939
|
+
* Built-in static embeds rendered during Markdown transformation.
|
|
2940
|
+
* Set to `false` to disable all built-in embeds.
|
|
2941
|
+
* @default { github: true, openGraph: true }
|
|
2942
|
+
*/
|
|
2943
|
+
embeds?: BuiltinEmbedOptions | false;
|
|
2944
|
+
/**
|
|
2945
|
+
* i18n (internationalization) options.
|
|
2946
|
+
* Set to false to disable i18n.
|
|
2947
|
+
* @default false
|
|
2948
|
+
*/
|
|
2949
|
+
i18n?: I18nOptions | false;
|
|
2950
|
+
}
|
|
2951
|
+
/**
|
|
2952
|
+
* Resolved options with all defaults applied.
|
|
2953
|
+
*/
|
|
2954
|
+
interface ResolvedOptions {
|
|
2955
|
+
srcDir: string;
|
|
2956
|
+
outDir: string;
|
|
2957
|
+
base: string;
|
|
2958
|
+
extensions: string[];
|
|
2959
|
+
ssg: ResolvedSsgOptions;
|
|
2960
|
+
siteMaps?: ResolvedSiteMapsOptions;
|
|
2961
|
+
publishState?: ResolvedPublishStateOptions;
|
|
2962
|
+
permalinks?: ResolvedPermalinksOptions;
|
|
2963
|
+
cascade?: ResolvedCascadeOptions;
|
|
2964
|
+
redirects?: ResolvedRedirectsOptions;
|
|
2965
|
+
blog?: ResolvedBlogOptions;
|
|
2966
|
+
feeds?: ResolvedFeedsOptions;
|
|
2967
|
+
pwa?: ResolvedPwaOptions;
|
|
2968
|
+
/**
|
|
2969
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
2970
|
+
*/
|
|
2971
|
+
icons?: ResolvedIconsOptions;
|
|
2972
|
+
taxonomies?: ResolvedTaxonomiesOptions;
|
|
2973
|
+
versions?: ResolvedVersionsOptions;
|
|
2974
|
+
resources?: ResolvedResourcesOptions;
|
|
2975
|
+
gfm: boolean;
|
|
2976
|
+
mdx?: boolean;
|
|
2977
|
+
footnotes: boolean;
|
|
2978
|
+
/**
|
|
2979
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
2980
|
+
*/
|
|
2981
|
+
semanticFootnotes?: boolean;
|
|
2982
|
+
tables: boolean;
|
|
2983
|
+
taskLists: boolean;
|
|
2984
|
+
strikethrough: boolean;
|
|
2985
|
+
autolinks: boolean;
|
|
2986
|
+
highlight: boolean;
|
|
2987
|
+
codeAnnotations: ResolvedCodeAnnotationsOptions;
|
|
2988
|
+
wikiLinks: ResolvedWikiLinkOptions;
|
|
2989
|
+
emojiShortcodes: ResolvedEmojiShortcodeOptions;
|
|
2990
|
+
attrs: ResolvedAttrsOptions;
|
|
2991
|
+
badges: ResolvedBadgeOptions;
|
|
2992
|
+
/**
|
|
2993
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
2994
|
+
*/
|
|
2995
|
+
notByAi?: ResolvedNotByAiOptions;
|
|
2996
|
+
keyboardKeys?: ResolvedKeyboardKeysOptions;
|
|
2997
|
+
/**
|
|
2998
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
2999
|
+
*/
|
|
3000
|
+
abbreviations?: ResolvedAbbreviationsOptions;
|
|
3001
|
+
/**
|
|
3002
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3003
|
+
*/
|
|
3004
|
+
definitionLists?: ResolvedDefinitionListOptions;
|
|
3005
|
+
/**
|
|
3006
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3007
|
+
*/
|
|
3008
|
+
magicLinks?: ResolvedMagicLinkOptions;
|
|
3009
|
+
containers: ResolvedContainerOptions;
|
|
3010
|
+
images: ResolvedImageOptions;
|
|
3011
|
+
/**
|
|
3012
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3013
|
+
*/
|
|
3014
|
+
imageGalleries?: ResolvedImageGalleryOptions;
|
|
3015
|
+
/**
|
|
3016
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3017
|
+
*/
|
|
3018
|
+
timelines?: ResolvedTimelineOptions;
|
|
3019
|
+
codeImports: ResolvedCodeImportOptions;
|
|
3020
|
+
includes: ResolvedIncludeOptions;
|
|
3021
|
+
/**
|
|
3022
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3023
|
+
*/
|
|
3024
|
+
partials?: ResolvedPartialsOptions;
|
|
3025
|
+
cards: ResolvedCardOptions;
|
|
3026
|
+
steps: ResolvedStepsOptions;
|
|
3027
|
+
/**
|
|
3028
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3029
|
+
*/
|
|
3030
|
+
codeGroups?: ResolvedCodeGroupOptions;
|
|
3031
|
+
fileTree: ResolvedFileTreeOptions;
|
|
3032
|
+
dataTables: ResolvedDataTableOptions;
|
|
3033
|
+
sanitize: ResolvedSanitizeOptions;
|
|
3034
|
+
editThisPage: ResolvedEditThisPageOptions;
|
|
3035
|
+
cjkEmphasis: boolean;
|
|
3036
|
+
codeBlockLint: ResolvedCodeBlockLintOptions;
|
|
3037
|
+
codeBlockTypecheck: ResolvedCodeBlockTypecheckOptions;
|
|
3038
|
+
/**
|
|
3039
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3040
|
+
*/
|
|
3041
|
+
typedHover?: ResolvedTypedHoverOptions;
|
|
3042
|
+
docsTests: ResolvedDocsTestOptions;
|
|
3043
|
+
mermaid: boolean;
|
|
3044
|
+
math: ResolvedMathOptions;
|
|
3045
|
+
frontmatter: boolean;
|
|
3046
|
+
toc: boolean;
|
|
3047
|
+
tocMaxDepth: number;
|
|
3048
|
+
/**
|
|
3049
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3050
|
+
*/
|
|
3051
|
+
headingPermalinks?: ResolvedHeadingPermalinksOptions;
|
|
3052
|
+
ogImage: boolean;
|
|
3053
|
+
ogImageOptions: ResolvedOgImageOptions$1;
|
|
3054
|
+
transformers: MarkdownTransformer[];
|
|
3055
|
+
docs: ResolvedDocsOptions | false;
|
|
3056
|
+
search: ResolvedSearchOptions;
|
|
3057
|
+
collections: ResolvedCollectionsOptions;
|
|
3058
|
+
ogViewer: boolean;
|
|
3059
|
+
embeds: ResolvedBuiltinEmbedOptions;
|
|
3060
|
+
i18n: ResolvedI18nOptions | false;
|
|
3061
|
+
}
|
|
3062
|
+
/**
|
|
3063
|
+
* Built-in embed configuration.
|
|
3064
|
+
*/
|
|
3065
|
+
interface BuiltinEmbedOptions {
|
|
3066
|
+
/**
|
|
3067
|
+
* Render `<GitHub repo="owner/name" />` repository cards.
|
|
3068
|
+
* Pass an options object to configure fetching.
|
|
3069
|
+
* @default true
|
|
3070
|
+
*/
|
|
3071
|
+
github?: boolean | GitHubOptions;
|
|
3072
|
+
/**
|
|
3073
|
+
* Render `<OgCard url="https://example.com" />` Open Graph link cards.
|
|
3074
|
+
* Pass an options object to configure fetching.
|
|
3075
|
+
* @default true
|
|
3076
|
+
*/
|
|
3077
|
+
openGraph?: boolean | OgpOptions;
|
|
3078
|
+
/**
|
|
3079
|
+
* Expand `<pm>npm install …</pm>` blocks into npm/pnpm/yarn/bun install tabs.
|
|
3080
|
+
*
|
|
3081
|
+
* Accepts a boolean to toggle the feature, or an options object to opt in to
|
|
3082
|
+
* synced tab groups. Synced groups are OFF by default; when enabled with
|
|
3083
|
+
* `{ sync: true }`, selecting a package manager in one block selects it in
|
|
3084
|
+
* every other package-manager block on the page (persisted in localStorage).
|
|
3085
|
+
* @default false
|
|
3086
|
+
*/
|
|
3087
|
+
pm?: boolean | BuiltinPmOptions;
|
|
3088
|
+
/**
|
|
3089
|
+
* Render `<Spotify url="https://open.spotify.com/track/...">` iframes.
|
|
3090
|
+
* @default false
|
|
3091
|
+
*/
|
|
3092
|
+
spotify?: boolean;
|
|
3093
|
+
/**
|
|
3094
|
+
* Render `<AppleMusic url="https://music.apple.com/...">` iframes.
|
|
3095
|
+
* @default false
|
|
3096
|
+
*/
|
|
3097
|
+
appleMusic?: boolean;
|
|
3098
|
+
/**
|
|
3099
|
+
* Render `<SpeakerDeck url="https://speakerdeck.com/...">` cards.
|
|
3100
|
+
* Player URLs and oEmbed-resolved share URLs render a lazy iframe plus
|
|
3101
|
+
* title/author metadata. Fetch or parse failures become a link card.
|
|
3102
|
+
* @default false
|
|
3103
|
+
*/
|
|
3104
|
+
speakerDeck?: boolean;
|
|
3105
|
+
/**
|
|
3106
|
+
* Render `<Audio src="https://...">` native audio players.
|
|
3107
|
+
* @default false
|
|
3108
|
+
*/
|
|
3109
|
+
audio?: boolean;
|
|
3110
|
+
/**
|
|
3111
|
+
* Render `<Video src="https://...">` native video players.
|
|
3112
|
+
* @default false
|
|
3113
|
+
*/
|
|
3114
|
+
video?: boolean;
|
|
3115
|
+
/**
|
|
3116
|
+
* Render `<StackBlitz url="https://stackblitz.com/edit/...">` iframes.
|
|
3117
|
+
* @default false
|
|
3118
|
+
*/
|
|
3119
|
+
stackBlitz?: boolean;
|
|
3120
|
+
/**
|
|
3121
|
+
* Render `<Tweet>` / `<XPost>` as static privacy-conscious cards.
|
|
3122
|
+
* Pass `{ fetch: true }` to fetch the post body, author, and self-hosted
|
|
3123
|
+
* media at build time. Fetch failures fall back to the link-only card.
|
|
3124
|
+
* @default false
|
|
3125
|
+
*/
|
|
3126
|
+
twitter?: boolean | TwitterEmbedOptions;
|
|
3127
|
+
/**
|
|
3128
|
+
* Render `<Reddit>` as a static post card.
|
|
3129
|
+
* Pass `{ fetch: false }` to skip metadata fetching and render a link-only card.
|
|
3130
|
+
* @default false
|
|
3131
|
+
*/
|
|
3132
|
+
reddit?: boolean | RedditEmbedOptions;
|
|
3133
|
+
/**
|
|
3134
|
+
* Render `<Bluesky>` as static cards.
|
|
3135
|
+
* @default false
|
|
3136
|
+
*/
|
|
3137
|
+
bluesky?: boolean;
|
|
3138
|
+
/**
|
|
3139
|
+
* Render `<WebContainer>` lazy placeholders with isolation metadata.
|
|
3140
|
+
* @default false
|
|
3141
|
+
*/
|
|
3142
|
+
webContainer?: boolean;
|
|
3143
|
+
}
|
|
3144
|
+
/**
|
|
3145
|
+
* Options for the package-manager install-tab transform.
|
|
3146
|
+
*/
|
|
3147
|
+
interface BuiltinPmOptions {
|
|
3148
|
+
/**
|
|
3149
|
+
* Enable opt-in synced package-manager tab groups.
|
|
3150
|
+
* @default false
|
|
3151
|
+
*/
|
|
3152
|
+
sync?: boolean;
|
|
3153
|
+
}
|
|
3154
|
+
/**
|
|
3155
|
+
* Resolved built-in embed configuration.
|
|
3156
|
+
*/
|
|
3157
|
+
interface ResolvedBuiltinEmbedOptions {
|
|
3158
|
+
github: GitHubOptions | false;
|
|
3159
|
+
openGraph: OgpOptions | false;
|
|
3160
|
+
pm: BuiltinPmOptions | false;
|
|
3161
|
+
spotify: boolean;
|
|
3162
|
+
appleMusic: boolean;
|
|
3163
|
+
speakerDeck: boolean;
|
|
3164
|
+
audio?: boolean;
|
|
3165
|
+
video?: boolean;
|
|
3166
|
+
stackBlitz: boolean;
|
|
3167
|
+
twitter: TwitterEmbedOptions | false;
|
|
3168
|
+
reddit?: RedditEmbedOptions | false;
|
|
3169
|
+
bluesky: boolean;
|
|
3170
|
+
webContainer: boolean;
|
|
3171
|
+
}
|
|
3172
|
+
/**
|
|
3173
|
+
* Options for opt-in `{badge:variant}` inline badges.
|
|
3174
|
+
*/
|
|
3175
|
+
interface BadgeOptions {
|
|
3176
|
+
/**
|
|
3177
|
+
* Enable the badge transform when an options object is supplied.
|
|
3178
|
+
*
|
|
3179
|
+
* @default true
|
|
3180
|
+
*/
|
|
3181
|
+
enabled?: boolean;
|
|
3182
|
+
}
|
|
3183
|
+
/**
|
|
3184
|
+
* Resolved inline-badge transform options.
|
|
3185
|
+
*/
|
|
3186
|
+
interface ResolvedBadgeOptions {
|
|
3187
|
+
enabled: boolean;
|
|
3188
|
+
}
|
|
3189
|
+
/**
|
|
3190
|
+
* Options for opt-in PHP Markdown Extra / mdBook-style definition lists.
|
|
3191
|
+
*/
|
|
3192
|
+
interface DefinitionListOptions {
|
|
3193
|
+
/**
|
|
3194
|
+
* Enable the definition-list transform when an options object is supplied.
|
|
3195
|
+
*
|
|
3196
|
+
* @default true
|
|
3197
|
+
*/
|
|
3198
|
+
enabled?: boolean;
|
|
3199
|
+
}
|
|
3200
|
+
/**
|
|
3201
|
+
* Resolved definition-list transform options.
|
|
3202
|
+
*/
|
|
3203
|
+
interface ResolvedDefinitionListOptions {
|
|
3204
|
+
enabled: boolean;
|
|
3205
|
+
}
|
|
3206
|
+
/**
|
|
3207
|
+
* Options for the opt-in `<NotByAI />` authorship badge.
|
|
3208
|
+
*/
|
|
3209
|
+
interface NotByAiOptions {
|
|
3210
|
+
/**
|
|
3211
|
+
* Enable the badge transform when an options object is supplied.
|
|
3212
|
+
*
|
|
3213
|
+
* @default true
|
|
3214
|
+
*/
|
|
3215
|
+
enabled?: boolean;
|
|
3216
|
+
/**
|
|
3217
|
+
* Accessible label for the badge link.
|
|
3218
|
+
*
|
|
3219
|
+
* @default "Written by human, not by AI"
|
|
3220
|
+
*/
|
|
3221
|
+
label?: string;
|
|
3222
|
+
/**
|
|
3223
|
+
* Destination URL. Unsafe values fall back to `https://notbyai.fyi`.
|
|
3224
|
+
*
|
|
3225
|
+
* @default "https://notbyai.fyi"
|
|
3226
|
+
*/
|
|
3227
|
+
href?: string;
|
|
3228
|
+
}
|
|
3229
|
+
/**
|
|
3230
|
+
* Resolved NotByAI authorship-badge options.
|
|
3231
|
+
*/
|
|
3232
|
+
interface ResolvedNotByAiOptions {
|
|
3233
|
+
enabled: boolean;
|
|
3234
|
+
label: string;
|
|
3235
|
+
href: string;
|
|
3236
|
+
}
|
|
3237
|
+
/**
|
|
3238
|
+
* Options for opt-in `{kbd:...}` inline keyboard keys.
|
|
3239
|
+
*/
|
|
3240
|
+
interface KeyboardKeysOptions {
|
|
3241
|
+
/**
|
|
3242
|
+
* Enable the keyboard-key transform when an options object is supplied.
|
|
3243
|
+
*
|
|
3244
|
+
* @default true
|
|
3245
|
+
*/
|
|
3246
|
+
enabled?: boolean;
|
|
3247
|
+
/**
|
|
3248
|
+
* Build-time aliases. Keys are matched case-insensitively and override
|
|
3249
|
+
* the built-in `cmd` / `ctrl` table.
|
|
3250
|
+
*/
|
|
3251
|
+
aliases?: Record<string, string>;
|
|
3252
|
+
/**
|
|
3253
|
+
* Built-in alias labels. `"words"` emits `Command`; `"symbols"` emits `⌘`.
|
|
3254
|
+
*
|
|
3255
|
+
* @default "words"
|
|
3256
|
+
*/
|
|
3257
|
+
style?: "words" | "symbols";
|
|
3258
|
+
}
|
|
3259
|
+
/**
|
|
3260
|
+
* Resolved inline keyboard-key transform options.
|
|
3261
|
+
*/
|
|
3262
|
+
interface ResolvedKeyboardKeysOptions {
|
|
3263
|
+
enabled: boolean;
|
|
3264
|
+
aliases: Record<string, string>;
|
|
3265
|
+
style: "words" | "symbols";
|
|
3266
|
+
}
|
|
3267
|
+
/**
|
|
3268
|
+
* Options for opt-in abbreviation and glossary expansion.
|
|
3269
|
+
*/
|
|
3270
|
+
interface AbbreviationsOptions {
|
|
3271
|
+
/**
|
|
3272
|
+
* Enable the transform when an options object is supplied.
|
|
3273
|
+
*
|
|
3274
|
+
* @default true
|
|
3275
|
+
*/
|
|
3276
|
+
enabled?: boolean;
|
|
3277
|
+
/**
|
|
3278
|
+
* Central glossary. Keys are matched with Unicode word boundaries.
|
|
3279
|
+
*/
|
|
3280
|
+
terms?: Record<string, string>;
|
|
3281
|
+
/**
|
|
3282
|
+
* Wrap only the first occurrence of each term.
|
|
3283
|
+
*
|
|
3284
|
+
* @default false
|
|
3285
|
+
*/
|
|
3286
|
+
firstUseOnly?: boolean;
|
|
3287
|
+
}
|
|
3288
|
+
/**
|
|
3289
|
+
* Resolved abbreviation / glossary transform options.
|
|
3290
|
+
*/
|
|
3291
|
+
interface ResolvedAbbreviationsOptions {
|
|
3292
|
+
enabled: boolean;
|
|
3293
|
+
terms: Record<string, string>;
|
|
3294
|
+
firstUseOnly: boolean;
|
|
3295
|
+
}
|
|
3296
|
+
/**
|
|
3297
|
+
* Options for opt-in `{link:...}` rich magic links.
|
|
3298
|
+
*/
|
|
3299
|
+
interface MagicLinkOptions {
|
|
3300
|
+
/**
|
|
3301
|
+
* Enable the magic-link transform when an options object is supplied.
|
|
3302
|
+
*
|
|
3303
|
+
* @default true
|
|
3304
|
+
*/
|
|
3305
|
+
enabled?: boolean;
|
|
3306
|
+
/**
|
|
3307
|
+
* Named aliases. A string value is treated as `{ href }`.
|
|
3308
|
+
*/
|
|
3309
|
+
aliases?: Record<string, string | MagicLinkAlias>;
|
|
3310
|
+
/**
|
|
3311
|
+
* Emit a favicon URL when a link has no image.
|
|
3312
|
+
*
|
|
3313
|
+
* `true` uses `https://{host}/favicon.ico`. Pass `{ template }` to override.
|
|
3314
|
+
* The transform never fetches; the browser may load the URL later.
|
|
3315
|
+
*
|
|
3316
|
+
* @default false
|
|
3317
|
+
*/
|
|
3318
|
+
favicon?: boolean | {
|
|
3319
|
+
template?: string;
|
|
3320
|
+
};
|
|
3321
|
+
/**
|
|
3322
|
+
* Replace the resolved image for matching hrefs.
|
|
3323
|
+
*/
|
|
3324
|
+
imageOverrides?: MagicLinkImageOverride[];
|
|
3325
|
+
}
|
|
3326
|
+
/**
|
|
3327
|
+
* One configured magic-link target.
|
|
3328
|
+
*/
|
|
3329
|
+
interface MagicLinkAlias {
|
|
3330
|
+
href: string;
|
|
3331
|
+
label?: string;
|
|
3332
|
+
image?: string;
|
|
3333
|
+
}
|
|
3334
|
+
/**
|
|
3335
|
+
* Replace the image for an exact href or prefix.
|
|
3336
|
+
*/
|
|
3337
|
+
interface MagicLinkImageOverride {
|
|
3338
|
+
href?: string;
|
|
3339
|
+
prefix?: string;
|
|
3340
|
+
image: string;
|
|
3341
|
+
}
|
|
3342
|
+
/**
|
|
3343
|
+
* Resolved magic-link transform options.
|
|
3344
|
+
*/
|
|
3345
|
+
interface ResolvedMagicLinkOptions {
|
|
3346
|
+
enabled: boolean;
|
|
3347
|
+
aliases: Record<string, MagicLinkAlias>;
|
|
3348
|
+
favicon: boolean;
|
|
3349
|
+
faviconTemplate?: string;
|
|
3350
|
+
imageOverrides: MagicLinkImageOverride[];
|
|
3351
|
+
}
|
|
3352
|
+
/**
|
|
3353
|
+
* Options for opt-in `::: type` custom containers.
|
|
3354
|
+
*/
|
|
3355
|
+
interface ContainerOptions {
|
|
3356
|
+
/**
|
|
3357
|
+
* Enable the container transform when an options object is supplied.
|
|
3358
|
+
*
|
|
3359
|
+
* @default true
|
|
3360
|
+
*/
|
|
3361
|
+
enabled?: boolean;
|
|
3362
|
+
/**
|
|
3363
|
+
* Extra or overriding container types.
|
|
3364
|
+
*
|
|
3365
|
+
* Keys must be ASCII identifiers (`[A-Za-z0-9_-]+`). Unknown hostile names
|
|
3366
|
+
* are ignored.
|
|
3367
|
+
*/
|
|
3368
|
+
types?: Record<string, ContainerTypeOptions>;
|
|
3369
|
+
}
|
|
3370
|
+
/**
|
|
3371
|
+
* Per-type container presentation.
|
|
3372
|
+
*/
|
|
3373
|
+
interface ContainerTypeOptions {
|
|
3374
|
+
/** Title used when the opener does not set one. */
|
|
3375
|
+
title?: string;
|
|
3376
|
+
/** `"details"` renders `<details>`/`<summary>`; anything else is a `<div>`. */
|
|
3377
|
+
tag?: "div" | "details";
|
|
3378
|
+
}
|
|
3379
|
+
/**
|
|
3380
|
+
* Resolved custom-container transform options.
|
|
3381
|
+
*/
|
|
3382
|
+
interface ResolvedContainerOptions {
|
|
3383
|
+
enabled: boolean;
|
|
3384
|
+
types: Record<string, ContainerTypeOptions>;
|
|
3385
|
+
}
|
|
3386
|
+
/**
|
|
3387
|
+
* Options for opt-in figures, captions, and lazy images.
|
|
3388
|
+
*/
|
|
3389
|
+
interface ImageOptions {
|
|
3390
|
+
/**
|
|
3391
|
+
* Add `loading="lazy"` to transformed images.
|
|
3392
|
+
*
|
|
3393
|
+
* @default true
|
|
1444
3394
|
*/
|
|
1445
|
-
|
|
3395
|
+
lazy?: boolean;
|
|
3396
|
+
}
|
|
3397
|
+
/**
|
|
3398
|
+
* Resolved image transform options.
|
|
3399
|
+
*/
|
|
3400
|
+
interface ResolvedImageOptions {
|
|
3401
|
+
enabled: boolean;
|
|
3402
|
+
lazy: boolean;
|
|
3403
|
+
}
|
|
3404
|
+
/**
|
|
3405
|
+
* Options for opt-in static image galleries.
|
|
3406
|
+
*/
|
|
3407
|
+
interface ImageGalleryOptions {
|
|
1446
3408
|
/**
|
|
1447
|
-
* Enable
|
|
1448
|
-
*
|
|
3409
|
+
* Enable `::: gallery` blocks.
|
|
3410
|
+
*
|
|
3411
|
+
* @default true when the options object is supplied.
|
|
3412
|
+
*/
|
|
3413
|
+
enabled?: boolean;
|
|
3414
|
+
/**
|
|
3415
|
+
* Add `loading="lazy"` to gallery images.
|
|
3416
|
+
*
|
|
3417
|
+
* @default follows `images.lazy`, or true when `images` is disabled.
|
|
3418
|
+
*/
|
|
3419
|
+
lazy?: boolean;
|
|
3420
|
+
/**
|
|
3421
|
+
* Diagnostics for image items without alt text.
|
|
3422
|
+
*
|
|
3423
|
+
* @default "error"
|
|
3424
|
+
*/
|
|
3425
|
+
missingAlt?: "error" | "warn" | "ignore";
|
|
3426
|
+
/**
|
|
3427
|
+
* Diagnostics for galleries without image items.
|
|
3428
|
+
*
|
|
3429
|
+
* @default "error"
|
|
3430
|
+
*/
|
|
3431
|
+
empty?: "error" | "warn" | "ignore";
|
|
3432
|
+
}
|
|
3433
|
+
/**
|
|
3434
|
+
* Resolved image gallery transform options.
|
|
3435
|
+
*/
|
|
3436
|
+
interface ResolvedImageGalleryOptions {
|
|
3437
|
+
enabled: boolean;
|
|
3438
|
+
lazy?: boolean;
|
|
3439
|
+
missingAlt: "error" | "warn" | "ignore";
|
|
3440
|
+
empty: "error" | "warn" | "ignore";
|
|
3441
|
+
}
|
|
3442
|
+
/**
|
|
3443
|
+
* Options for opt-in static timelines.
|
|
3444
|
+
*/
|
|
3445
|
+
interface TimelineOptions {
|
|
3446
|
+
/**
|
|
3447
|
+
* Enable `::: timeline` blocks.
|
|
3448
|
+
*
|
|
3449
|
+
* @default true when the options object is supplied.
|
|
3450
|
+
*/
|
|
3451
|
+
enabled?: boolean;
|
|
3452
|
+
/**
|
|
3453
|
+
* Render timelines as ordered lists unless a block overrides it.
|
|
3454
|
+
*
|
|
1449
3455
|
* @default true
|
|
1450
3456
|
*/
|
|
1451
|
-
|
|
3457
|
+
ordered?: boolean;
|
|
1452
3458
|
/**
|
|
1453
|
-
*
|
|
1454
|
-
*
|
|
1455
|
-
* @default
|
|
3459
|
+
* Diagnostics for malformed `YYYY`, `YYYY-MM`, or `YYYY-MM-DD` item dates.
|
|
3460
|
+
*
|
|
3461
|
+
* @default "error"
|
|
1456
3462
|
*/
|
|
1457
|
-
|
|
3463
|
+
invalidDate?: "error" | "warn" | "ignore";
|
|
1458
3464
|
/**
|
|
1459
|
-
*
|
|
1460
|
-
*
|
|
3465
|
+
* Diagnostics for unsupported item metadata.
|
|
3466
|
+
*
|
|
3467
|
+
* @default "error"
|
|
3468
|
+
*/
|
|
3469
|
+
unknownMeta?: "error" | "warn" | "ignore";
|
|
3470
|
+
/**
|
|
3471
|
+
* Diagnostics for timeline blocks without items.
|
|
3472
|
+
*
|
|
3473
|
+
* @default "error"
|
|
3474
|
+
*/
|
|
3475
|
+
empty?: "error" | "warn" | "ignore";
|
|
3476
|
+
}
|
|
3477
|
+
/**
|
|
3478
|
+
* Resolved timeline transform options.
|
|
3479
|
+
*/
|
|
3480
|
+
interface ResolvedTimelineOptions {
|
|
3481
|
+
enabled: boolean;
|
|
3482
|
+
ordered: boolean;
|
|
3483
|
+
invalidDate: "error" | "warn" | "ignore";
|
|
3484
|
+
unknownMeta: "error" | "warn" | "ignore";
|
|
3485
|
+
empty: "error" | "warn" | "ignore";
|
|
3486
|
+
}
|
|
3487
|
+
/**
|
|
3488
|
+
* Options for opt-in page-bundle resources and image processing.
|
|
3489
|
+
*/
|
|
3490
|
+
interface ResourcesOptions {
|
|
3491
|
+
/**
|
|
3492
|
+
* Allowed output formats for `?format=`.
|
|
3493
|
+
*
|
|
3494
|
+
* `jpg` is treated as `jpeg`. Pixel transforms encode `png` and `jpeg`.
|
|
3495
|
+
* `webp` is copied when the source is already webp and no pixel
|
|
3496
|
+
* transform is requested.
|
|
3497
|
+
*
|
|
3498
|
+
* @default ["png", "jpeg", "webp"]
|
|
3499
|
+
*/
|
|
3500
|
+
formats?: string[];
|
|
3501
|
+
/**
|
|
3502
|
+
* Allowed `?width=` / `?w=` values. An empty list allows any positive
|
|
3503
|
+
* width.
|
|
3504
|
+
*
|
|
3505
|
+
* @default []
|
|
3506
|
+
*/
|
|
3507
|
+
widths?: number[];
|
|
3508
|
+
/**
|
|
3509
|
+
* What to do when a relative resource is missing.
|
|
3510
|
+
*
|
|
3511
|
+
* @default "error"
|
|
3512
|
+
*/
|
|
3513
|
+
missing?: "error" | "warn";
|
|
3514
|
+
/**
|
|
3515
|
+
* Emit identical bytes once as `/assets/content/<sha256>.<ext>` and
|
|
3516
|
+
* rewrite `src`, `poster`, and relevant `href` to that URL.
|
|
3517
|
+
*
|
|
3518
|
+
* Off unless this is `true`. `resources: true` and `{}` leave it off.
|
|
3519
|
+
*
|
|
1461
3520
|
* @default false
|
|
1462
3521
|
*/
|
|
1463
|
-
|
|
3522
|
+
dedupe?: boolean;
|
|
1464
3523
|
}
|
|
1465
3524
|
/**
|
|
1466
|
-
* Resolved options
|
|
3525
|
+
* Resolved page-resource options.
|
|
1467
3526
|
*/
|
|
1468
|
-
interface
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
gfm: boolean;
|
|
1475
|
-
footnotes: boolean;
|
|
1476
|
-
tables: boolean;
|
|
1477
|
-
taskLists: boolean;
|
|
1478
|
-
strikethrough: boolean;
|
|
1479
|
-
autolinks: boolean;
|
|
1480
|
-
highlight: boolean;
|
|
1481
|
-
highlightTheme: string | ThemeRegistration$1;
|
|
1482
|
-
highlightLangs: LanguageRegistration$1[];
|
|
1483
|
-
codeAnnotations: ResolvedCodeAnnotationsOptions;
|
|
1484
|
-
wikiLinks: ResolvedWikiLinkOptions;
|
|
1485
|
-
emojiShortcodes: ResolvedEmojiShortcodeOptions;
|
|
1486
|
-
attrs: ResolvedAttrsOptions;
|
|
1487
|
-
codeImports: ResolvedCodeImportOptions;
|
|
1488
|
-
sanitize: ResolvedSanitizeOptions;
|
|
1489
|
-
editThisPage: ResolvedEditThisPageOptions;
|
|
1490
|
-
cjkEmphasis: boolean;
|
|
1491
|
-
codeBlockLint: ResolvedCodeBlockLintOptions;
|
|
1492
|
-
codeBlockTypecheck: ResolvedCodeBlockTypecheckOptions;
|
|
1493
|
-
docsTests: ResolvedDocsTestOptions;
|
|
1494
|
-
mermaid: boolean;
|
|
1495
|
-
frontmatter: boolean;
|
|
1496
|
-
toc: boolean;
|
|
1497
|
-
tocMaxDepth: number;
|
|
1498
|
-
ogImage: boolean;
|
|
1499
|
-
ogImageOptions: ResolvedOgImageOptions$1;
|
|
1500
|
-
transformers: MarkdownTransformer[];
|
|
1501
|
-
docs: ResolvedDocsOptions | false;
|
|
1502
|
-
search: ResolvedSearchOptions;
|
|
1503
|
-
collections: ResolvedCollectionsOptions;
|
|
1504
|
-
ogViewer: boolean;
|
|
1505
|
-
embeds: ResolvedBuiltinEmbedOptions;
|
|
1506
|
-
i18n: ResolvedI18nOptions | false;
|
|
3527
|
+
interface ResolvedResourcesOptions {
|
|
3528
|
+
enabled: boolean;
|
|
3529
|
+
formats: string[];
|
|
3530
|
+
widths: number[];
|
|
3531
|
+
missing: "error" | "warn";
|
|
3532
|
+
dedupe: boolean;
|
|
1507
3533
|
}
|
|
1508
3534
|
/**
|
|
1509
|
-
*
|
|
3535
|
+
* Options for expanding Obsidian-style wiki links.
|
|
3536
|
+
*
|
|
3537
|
+
* The transform accepts `[[target]]` and `[[target|label]]` syntax and rewrites
|
|
3538
|
+
* it to regular links before rendering. It is intentionally small: path
|
|
3539
|
+
* resolution is based on the configured base URL rather than a full backlink
|
|
3540
|
+
* graph.
|
|
1510
3541
|
*/
|
|
1511
|
-
interface
|
|
3542
|
+
interface WikiLinkOptions {
|
|
1512
3543
|
/**
|
|
1513
|
-
*
|
|
1514
|
-
*
|
|
3544
|
+
* Base URL prepended to resolved wiki-link targets.
|
|
3545
|
+
*
|
|
3546
|
+
* When omitted, the top-level `base` option is used.
|
|
3547
|
+
*
|
|
3548
|
+
* @default options.base
|
|
3549
|
+
*/
|
|
3550
|
+
baseUrl?: string;
|
|
3551
|
+
}
|
|
3552
|
+
/**
|
|
3553
|
+
* Resolved wiki-link transform options.
|
|
3554
|
+
*/
|
|
3555
|
+
interface ResolvedWikiLinkOptions {
|
|
3556
|
+
enabled: boolean;
|
|
3557
|
+
baseUrl: string;
|
|
3558
|
+
}
|
|
3559
|
+
/**
|
|
3560
|
+
* Options for expanding `:shortcode:` emoji aliases.
|
|
3561
|
+
*
|
|
3562
|
+
* The transform replaces recognized shortcode tokens with their Unicode emoji
|
|
3563
|
+
* equivalents during Markdown transformation. Unknown shortcodes are left
|
|
3564
|
+
* untouched so colon-delimited text can still be used by other tools.
|
|
3565
|
+
*/
|
|
3566
|
+
interface EmojiShortcodeOptions {
|
|
3567
|
+
/**
|
|
3568
|
+
* Custom shortcode map merged with the built-in emoji aliases.
|
|
3569
|
+
*
|
|
3570
|
+
* Keys should omit the surrounding colons.
|
|
3571
|
+
*
|
|
3572
|
+
* @example
|
|
3573
|
+
* ```ts
|
|
3574
|
+
* custom: { shipit: '\u{1F6A2}' }
|
|
3575
|
+
* ```
|
|
3576
|
+
*
|
|
3577
|
+
* @default {}
|
|
3578
|
+
*/
|
|
3579
|
+
custom?: Record<string, string>;
|
|
3580
|
+
}
|
|
3581
|
+
/**
|
|
3582
|
+
* Resolved emoji-shortcode transform options.
|
|
3583
|
+
*/
|
|
3584
|
+
interface ResolvedEmojiShortcodeOptions {
|
|
3585
|
+
enabled: boolean;
|
|
3586
|
+
custom: Record<string, string>;
|
|
3587
|
+
}
|
|
3588
|
+
/**
|
|
3589
|
+
* Options for opt-in `$…$` / `$$…$$` math.
|
|
3590
|
+
*
|
|
3591
|
+
* Delimiter parsing lives in the native transform. Typesetting uses KaTeX at
|
|
3592
|
+
* build time when the optional `katex` peer is installed. Sites that omit
|
|
3593
|
+
* `math` do not need that package.
|
|
3594
|
+
*/
|
|
3595
|
+
interface MathOptions {
|
|
3596
|
+
/**
|
|
3597
|
+
* Enable the math transform when an options object is supplied.
|
|
3598
|
+
*
|
|
1515
3599
|
* @default true
|
|
1516
3600
|
*/
|
|
1517
|
-
|
|
3601
|
+
enabled?: boolean;
|
|
3602
|
+
}
|
|
3603
|
+
/**
|
|
3604
|
+
* Resolved math transform options.
|
|
3605
|
+
*/
|
|
3606
|
+
interface ResolvedMathOptions {
|
|
3607
|
+
enabled: boolean;
|
|
3608
|
+
}
|
|
3609
|
+
/**
|
|
3610
|
+
* Options for markdown-it-attrs style attribute blocks.
|
|
3611
|
+
*
|
|
3612
|
+
* Attribute blocks let authors attach IDs, classes, and key/value attributes to
|
|
3613
|
+
* nearby Markdown nodes with syntax such as `{#install .lead}`.
|
|
3614
|
+
*/
|
|
3615
|
+
interface AttrsOptions {
|
|
1518
3616
|
/**
|
|
1519
|
-
*
|
|
1520
|
-
*
|
|
3617
|
+
* Enable the attrs transform when an options object is supplied.
|
|
3618
|
+
*
|
|
3619
|
+
* Set to `false` to keep the object shape while disabling the transform.
|
|
3620
|
+
* This is mainly useful for config merging where callers want to preserve a
|
|
3621
|
+
* stable object structure.
|
|
3622
|
+
*
|
|
1521
3623
|
* @default true
|
|
1522
3624
|
*/
|
|
1523
|
-
|
|
3625
|
+
enabled?: boolean;
|
|
3626
|
+
}
|
|
3627
|
+
/**
|
|
3628
|
+
* Resolved attrs transform options.
|
|
3629
|
+
*/
|
|
3630
|
+
interface ResolvedAttrsOptions {
|
|
3631
|
+
enabled: boolean;
|
|
3632
|
+
}
|
|
3633
|
+
/**
|
|
3634
|
+
* Opt-in visible heading permalinks.
|
|
3635
|
+
*
|
|
3636
|
+
* Headings already have stable `id`s. Enabling this appends a real
|
|
3637
|
+
* `<a class="header-anchor" href="#id">` using that exact id. Off by
|
|
3638
|
+
* default so existing HTML stays byte-stable.
|
|
3639
|
+
*/
|
|
3640
|
+
interface HeadingPermalinksOptions {
|
|
1524
3641
|
/**
|
|
1525
|
-
*
|
|
3642
|
+
* Emit the permalink control.
|
|
1526
3643
|
*
|
|
1527
|
-
*
|
|
1528
|
-
* synced tab groups. Synced groups are OFF by default; when enabled with
|
|
1529
|
-
* `{ sync: true }`, selecting a package manager in one block selects it in
|
|
1530
|
-
* every other package-manager block on the page (persisted in localStorage).
|
|
1531
|
-
* @default false
|
|
3644
|
+
* @default true
|
|
1532
3645
|
*/
|
|
1533
|
-
|
|
3646
|
+
enabled?: boolean;
|
|
3647
|
+
}
|
|
3648
|
+
/**
|
|
3649
|
+
* Resolved heading permalink options.
|
|
3650
|
+
*/
|
|
3651
|
+
interface ResolvedHeadingPermalinksOptions {
|
|
3652
|
+
enabled: boolean;
|
|
3653
|
+
}
|
|
3654
|
+
/**
|
|
3655
|
+
* Options for importing source snippets into code fences.
|
|
3656
|
+
*
|
|
3657
|
+
* The transform resolves `<<<` imports before code highlighting and other
|
|
3658
|
+
* code-block features run. Imported snippets therefore behave like ordinary
|
|
3659
|
+
* fenced code in later stages.
|
|
3660
|
+
*/
|
|
3661
|
+
interface CodeImportOptions {
|
|
1534
3662
|
/**
|
|
1535
|
-
*
|
|
1536
|
-
*
|
|
3663
|
+
* Directory used to resolve `<<<` imports.
|
|
3664
|
+
*
|
|
3665
|
+
* When omitted, imports resolve from the Vite project root and configured aliases.
|
|
3666
|
+
*
|
|
3667
|
+
* @example
|
|
3668
|
+
* ```ts
|
|
3669
|
+
* rootDir: 'examples'
|
|
3670
|
+
* ```
|
|
3671
|
+
*
|
|
3672
|
+
* @default undefined
|
|
3673
|
+
*/
|
|
3674
|
+
rootDir?: string;
|
|
3675
|
+
}
|
|
3676
|
+
/**
|
|
3677
|
+
* Resolved code-import transform options.
|
|
3678
|
+
*/
|
|
3679
|
+
interface ResolvedCodeImportOptions {
|
|
3680
|
+
enabled: boolean;
|
|
3681
|
+
rootDir?: string;
|
|
3682
|
+
}
|
|
3683
|
+
/**
|
|
3684
|
+
* Options for inlining Markdown files with `<!-- @include: PATH -->`.
|
|
3685
|
+
*
|
|
3686
|
+
* Relative paths resolve from the current file. `@/` and leading `/` resolve
|
|
3687
|
+
* from `rootDir`. After canonicalize, paths outside `rootDir` are rejected.
|
|
3688
|
+
*/
|
|
3689
|
+
interface IncludeOptions {
|
|
3690
|
+
/**
|
|
3691
|
+
* Directory used to resolve `@/` and absolute include paths.
|
|
3692
|
+
*
|
|
3693
|
+
* When omitted, includes resolve from the Vite project root.
|
|
3694
|
+
*
|
|
3695
|
+
* @default undefined
|
|
1537
3696
|
*/
|
|
1538
|
-
|
|
3697
|
+
rootDir?: string;
|
|
3698
|
+
}
|
|
3699
|
+
/**
|
|
3700
|
+
* Resolved Markdown-include transform options.
|
|
3701
|
+
*/
|
|
3702
|
+
interface ResolvedIncludeOptions {
|
|
3703
|
+
enabled: boolean;
|
|
3704
|
+
rootDir?: string;
|
|
3705
|
+
}
|
|
3706
|
+
/**
|
|
3707
|
+
* Options for parameterized Markdown partials with `<!-- @partial: PATH k="v" -->`.
|
|
3708
|
+
*
|
|
3709
|
+
* Bare names resolve under `root` (`_partials` by default). Relative `./` and
|
|
3710
|
+
* `../` paths resolve from the current file. `@/` and leading `/` resolve from
|
|
3711
|
+
* `rootDir`. After canonicalize, paths outside `rootDir` are rejected.
|
|
3712
|
+
*/
|
|
3713
|
+
interface PartialsOptions {
|
|
1539
3714
|
/**
|
|
1540
|
-
*
|
|
1541
|
-
*
|
|
3715
|
+
* Enable the transform when an options object is supplied.
|
|
3716
|
+
*
|
|
3717
|
+
* @default true
|
|
1542
3718
|
*/
|
|
1543
|
-
|
|
3719
|
+
enabled?: boolean;
|
|
1544
3720
|
/**
|
|
1545
|
-
*
|
|
1546
|
-
*
|
|
1547
|
-
*
|
|
1548
|
-
* @default false
|
|
3721
|
+
* Directory used to resolve `@/` and absolute partial paths.
|
|
3722
|
+
*
|
|
3723
|
+
* @default undefined
|
|
1549
3724
|
*/
|
|
1550
|
-
|
|
3725
|
+
rootDir?: string;
|
|
1551
3726
|
/**
|
|
1552
|
-
*
|
|
1553
|
-
*
|
|
3727
|
+
* Directory used for bare names such as `install.md`.
|
|
3728
|
+
*
|
|
3729
|
+
* @default "_partials"
|
|
1554
3730
|
*/
|
|
1555
|
-
|
|
3731
|
+
root?: string;
|
|
1556
3732
|
/**
|
|
1557
|
-
*
|
|
1558
|
-
*
|
|
3733
|
+
* Missing `{{ name }}` substitutions stay literal, or report a diagnostic.
|
|
3734
|
+
*
|
|
3735
|
+
* @default "literal"
|
|
1559
3736
|
*/
|
|
1560
|
-
|
|
3737
|
+
missing?: "literal" | "error";
|
|
1561
3738
|
}
|
|
1562
3739
|
/**
|
|
1563
|
-
*
|
|
3740
|
+
* Resolved parameterized-partial transform options.
|
|
1564
3741
|
*/
|
|
1565
|
-
interface
|
|
3742
|
+
interface ResolvedPartialsOptions {
|
|
3743
|
+
enabled: boolean;
|
|
3744
|
+
rootDir?: string;
|
|
3745
|
+
root: string;
|
|
3746
|
+
missing: "literal" | "error";
|
|
3747
|
+
}
|
|
3748
|
+
/**
|
|
3749
|
+
* Options for opt-in `::: card` / `::: link-card` / `::: card-grid` blocks.
|
|
3750
|
+
*/
|
|
3751
|
+
interface CardOptions {
|
|
1566
3752
|
/**
|
|
1567
|
-
* Enable
|
|
1568
|
-
*
|
|
3753
|
+
* Enable the card transform when an options object is supplied.
|
|
3754
|
+
*
|
|
3755
|
+
* @default true
|
|
1569
3756
|
*/
|
|
1570
|
-
|
|
3757
|
+
enabled?: boolean;
|
|
1571
3758
|
}
|
|
1572
3759
|
/**
|
|
1573
|
-
* Resolved
|
|
3760
|
+
* Resolved card transform options.
|
|
1574
3761
|
*/
|
|
1575
|
-
interface
|
|
1576
|
-
|
|
1577
|
-
openGraph: OgpOptions | false;
|
|
1578
|
-
pm: BuiltinPmOptions | false;
|
|
1579
|
-
spotify: boolean;
|
|
1580
|
-
stackBlitz: boolean;
|
|
1581
|
-
twitter: TwitterEmbedOptions | false;
|
|
1582
|
-
bluesky: boolean;
|
|
1583
|
-
webContainer: boolean;
|
|
3762
|
+
interface ResolvedCardOptions {
|
|
3763
|
+
enabled: boolean;
|
|
1584
3764
|
}
|
|
1585
3765
|
/**
|
|
1586
|
-
* Options for
|
|
1587
|
-
*
|
|
1588
|
-
* The transform accepts `[[target]]` and `[[target|label]]` syntax and rewrites
|
|
1589
|
-
* it to regular links before rendering. It is intentionally small: path
|
|
1590
|
-
* resolution is based on the configured base URL rather than a full backlink
|
|
1591
|
-
* graph.
|
|
3766
|
+
* Options for opt-in `::: steps` ordered lists.
|
|
1592
3767
|
*/
|
|
1593
|
-
interface
|
|
3768
|
+
interface StepsOptions {
|
|
1594
3769
|
/**
|
|
1595
|
-
*
|
|
1596
|
-
*
|
|
1597
|
-
* When omitted, the top-level `base` option is used.
|
|
3770
|
+
* Enable the steps transform when an options object is supplied.
|
|
1598
3771
|
*
|
|
1599
|
-
* @default
|
|
3772
|
+
* @default true
|
|
1600
3773
|
*/
|
|
1601
|
-
|
|
3774
|
+
enabled?: boolean;
|
|
1602
3775
|
}
|
|
1603
3776
|
/**
|
|
1604
|
-
* Resolved
|
|
3777
|
+
* Resolved step-list transform options.
|
|
1605
3778
|
*/
|
|
1606
|
-
interface
|
|
3779
|
+
interface ResolvedStepsOptions {
|
|
1607
3780
|
enabled: boolean;
|
|
1608
|
-
baseUrl: string;
|
|
1609
3781
|
}
|
|
1610
3782
|
/**
|
|
1611
|
-
* Options for
|
|
1612
|
-
*
|
|
1613
|
-
* The transform replaces recognized shortcode tokens with their Unicode emoji
|
|
1614
|
-
* equivalents during Markdown transformation. Unknown shortcodes are left
|
|
1615
|
-
* untouched so colon-delimited text can still be used by other tools.
|
|
3783
|
+
* Options for opt-in `::: code-group` fence groups.
|
|
1616
3784
|
*/
|
|
1617
|
-
interface
|
|
3785
|
+
interface CodeGroupOptions {
|
|
1618
3786
|
/**
|
|
1619
|
-
*
|
|
1620
|
-
*
|
|
1621
|
-
* Keys should omit the surrounding colons.
|
|
1622
|
-
*
|
|
1623
|
-
* @example
|
|
1624
|
-
* ```ts
|
|
1625
|
-
* custom: { shipit: '\u{1F6A2}' }
|
|
1626
|
-
* ```
|
|
3787
|
+
* Enable the code-group transform when an options object is supplied.
|
|
1627
3788
|
*
|
|
1628
|
-
* @default
|
|
3789
|
+
* @default true
|
|
1629
3790
|
*/
|
|
1630
|
-
|
|
3791
|
+
enabled?: boolean;
|
|
1631
3792
|
}
|
|
1632
3793
|
/**
|
|
1633
|
-
* Resolved
|
|
3794
|
+
* Resolved code-group transform options.
|
|
1634
3795
|
*/
|
|
1635
|
-
interface
|
|
3796
|
+
interface ResolvedCodeGroupOptions {
|
|
1636
3797
|
enabled: boolean;
|
|
1637
|
-
custom: Record<string, string>;
|
|
1638
3798
|
}
|
|
1639
3799
|
/**
|
|
1640
|
-
*
|
|
1641
|
-
*
|
|
1642
|
-
* Attribute blocks let authors attach IDs, classes, and key/value attributes to
|
|
1643
|
-
* nearby Markdown nodes with syntax such as `{#install .lead}`.
|
|
3800
|
+
* Replaceable file-tree icons. Values are trusted site-config SVG markup or
|
|
3801
|
+
* CSS class tokens, never fence content.
|
|
1644
3802
|
*/
|
|
1645
|
-
interface
|
|
3803
|
+
interface FileTreeIconOptions {
|
|
3804
|
+
/** Collapsed folder icon. */
|
|
3805
|
+
folder?: string;
|
|
3806
|
+
/** Open folder icon. */
|
|
3807
|
+
folderOpen?: string;
|
|
3808
|
+
/** Default file icon. */
|
|
3809
|
+
file?: string;
|
|
3810
|
+
/** File icons keyed by extension (`ts`, `.json`). */
|
|
3811
|
+
files?: Record<string, string>;
|
|
3812
|
+
}
|
|
3813
|
+
/**
|
|
3814
|
+
* Options for opt-in `file-tree` fences.
|
|
3815
|
+
*/
|
|
3816
|
+
interface FileTreeOptions {
|
|
1646
3817
|
/**
|
|
1647
|
-
* Enable the
|
|
1648
|
-
*
|
|
1649
|
-
* Set to `false` to keep the object shape while disabling the transform.
|
|
1650
|
-
* This is mainly useful for config merging where callers want to preserve a
|
|
1651
|
-
* stable object structure.
|
|
3818
|
+
* Enable the file-tree transform when an options object is supplied.
|
|
1652
3819
|
*
|
|
1653
3820
|
* @default true
|
|
1654
3821
|
*/
|
|
1655
3822
|
enabled?: boolean;
|
|
3823
|
+
/**
|
|
3824
|
+
* Open directory `<details>` by default.
|
|
3825
|
+
*
|
|
3826
|
+
* @default true
|
|
3827
|
+
*/
|
|
3828
|
+
defaultOpen?: boolean;
|
|
3829
|
+
/**
|
|
3830
|
+
* Render folder and file icons. Pass an object to replace the defaults.
|
|
3831
|
+
*
|
|
3832
|
+
* @default true
|
|
3833
|
+
*/
|
|
3834
|
+
icons?: boolean | FileTreeIconOptions;
|
|
1656
3835
|
}
|
|
1657
3836
|
/**
|
|
1658
|
-
* Resolved
|
|
3837
|
+
* Resolved file-tree transform options.
|
|
1659
3838
|
*/
|
|
1660
|
-
interface
|
|
3839
|
+
interface ResolvedFileTreeOptions {
|
|
1661
3840
|
enabled: boolean;
|
|
3841
|
+
defaultOpen: boolean;
|
|
3842
|
+
icons: boolean;
|
|
3843
|
+
iconFolder?: string;
|
|
3844
|
+
iconFolderOpen?: string;
|
|
3845
|
+
iconFile?: string;
|
|
3846
|
+
iconFiles?: Record<string, string>;
|
|
1662
3847
|
}
|
|
1663
3848
|
/**
|
|
1664
|
-
* Options for
|
|
1665
|
-
*
|
|
1666
|
-
* The transform resolves `<<<` imports before code highlighting and other
|
|
1667
|
-
* code-block features run. Imported snippets therefore behave like ordinary
|
|
1668
|
-
* fenced code in later stages.
|
|
3849
|
+
* Options for opt-in `csv-table` / `json-table` fences.
|
|
1669
3850
|
*/
|
|
1670
|
-
interface
|
|
3851
|
+
interface DataTableOptions {
|
|
1671
3852
|
/**
|
|
1672
|
-
*
|
|
3853
|
+
* Enable the data-table transform when an options object is supplied.
|
|
1673
3854
|
*
|
|
1674
|
-
*
|
|
3855
|
+
* @default true
|
|
3856
|
+
*/
|
|
3857
|
+
enabled?: boolean;
|
|
3858
|
+
/**
|
|
3859
|
+
* Directory used to resolve `@/` and absolute import paths.
|
|
1675
3860
|
*
|
|
1676
|
-
*
|
|
1677
|
-
* ```ts
|
|
1678
|
-
* rootDir: 'examples'
|
|
1679
|
-
* ```
|
|
3861
|
+
* When omitted, imports resolve from the Vite project root.
|
|
1680
3862
|
*
|
|
1681
3863
|
* @default undefined
|
|
1682
3864
|
*/
|
|
1683
3865
|
rootDir?: string;
|
|
3866
|
+
/**
|
|
3867
|
+
* What to do when an imported CSV/JSON file is missing.
|
|
3868
|
+
*
|
|
3869
|
+
* @default "error"
|
|
3870
|
+
*/
|
|
3871
|
+
missing?: "error" | "warn";
|
|
1684
3872
|
}
|
|
1685
3873
|
/**
|
|
1686
|
-
* Resolved
|
|
3874
|
+
* Resolved data-table transform options.
|
|
1687
3875
|
*/
|
|
1688
|
-
interface
|
|
3876
|
+
interface ResolvedDataTableOptions {
|
|
1689
3877
|
enabled: boolean;
|
|
1690
3878
|
rootDir?: string;
|
|
3879
|
+
missing: "error" | "warn";
|
|
1691
3880
|
}
|
|
1692
3881
|
/**
|
|
1693
3882
|
* Options for sanitizing rendered HTML.
|
|
@@ -1890,6 +4079,43 @@ interface ResolvedCodeBlockTypecheckOptions {
|
|
|
1890
4079
|
tsgoCommand: string;
|
|
1891
4080
|
mode: "warn" | "error";
|
|
1892
4081
|
}
|
|
4082
|
+
/**
|
|
4083
|
+
* Options for opt-in typed hover overlays on TypeScript fences.
|
|
4084
|
+
*
|
|
4085
|
+
* Hover strings are computed at build time with the same TypeScript compiler
|
|
4086
|
+
* family used by `codeBlockTypecheck` (`tsgo` / `typescript`). The browser
|
|
4087
|
+
* only receives JSON payloads and a tiny overlay script.
|
|
4088
|
+
*/
|
|
4089
|
+
interface TypedHoverOptions {
|
|
4090
|
+
/**
|
|
4091
|
+
* Enable typed hover overlays.
|
|
4092
|
+
*
|
|
4093
|
+
* @default true when the object form is used
|
|
4094
|
+
*/
|
|
4095
|
+
enabled?: boolean;
|
|
4096
|
+
/**
|
|
4097
|
+
* Fence languages that can receive hover payloads.
|
|
4098
|
+
*
|
|
4099
|
+
* Language names are compared case-insensitively.
|
|
4100
|
+
*
|
|
4101
|
+
* @default ['ts', 'tsx']
|
|
4102
|
+
*/
|
|
4103
|
+
languages?: string[];
|
|
4104
|
+
/**
|
|
4105
|
+
* Path to the `tsgo` binary used to compute hover types.
|
|
4106
|
+
*
|
|
4107
|
+
* When omitted, the bundled `@typescript/native-preview` executable is used.
|
|
4108
|
+
*/
|
|
4109
|
+
tsgoCommand?: string;
|
|
4110
|
+
}
|
|
4111
|
+
/**
|
|
4112
|
+
* Resolved typed-hover options.
|
|
4113
|
+
*/
|
|
4114
|
+
interface ResolvedTypedHoverOptions {
|
|
4115
|
+
enabled: boolean;
|
|
4116
|
+
languages: string[];
|
|
4117
|
+
tsgoCommand?: string;
|
|
4118
|
+
}
|
|
1893
4119
|
/**
|
|
1894
4120
|
* Options for extracting fenced examples into docs-as-tests fixtures.
|
|
1895
4121
|
*
|
|
@@ -1972,11 +4198,67 @@ interface ResolvedCodeAnnotationsOptions {
|
|
|
1972
4198
|
metaKey: string;
|
|
1973
4199
|
defaultLineNumbers: boolean;
|
|
1974
4200
|
}
|
|
4201
|
+
/**
|
|
4202
|
+
* OG image rendering backend.
|
|
4203
|
+
*/
|
|
4204
|
+
type OgImageRenderer = "chromium" | "satori";
|
|
4205
|
+
/**
|
|
4206
|
+
* Font weight values supported by Satori.
|
|
4207
|
+
*/
|
|
4208
|
+
type OgImageSatoriFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
4209
|
+
/**
|
|
4210
|
+
* Font file loaded by the Satori renderer.
|
|
4211
|
+
*/
|
|
4212
|
+
interface OgImageSatoriFont {
|
|
4213
|
+
/**
|
|
4214
|
+
* Absolute path, or a path relative to the project root.
|
|
4215
|
+
*/
|
|
4216
|
+
path: string;
|
|
4217
|
+
/**
|
|
4218
|
+
* Font family name used by template CSS.
|
|
4219
|
+
*/
|
|
4220
|
+
name?: string;
|
|
4221
|
+
/**
|
|
4222
|
+
* Font weight.
|
|
4223
|
+
* @default 400
|
|
4224
|
+
*/
|
|
4225
|
+
weight?: OgImageSatoriFontWeight;
|
|
4226
|
+
/**
|
|
4227
|
+
* Font style.
|
|
4228
|
+
* @default "normal"
|
|
4229
|
+
*/
|
|
4230
|
+
style?: "normal" | "italic";
|
|
4231
|
+
}
|
|
4232
|
+
/**
|
|
4233
|
+
* Satori renderer options.
|
|
4234
|
+
*/
|
|
4235
|
+
interface OgImageSatoriOptions {
|
|
4236
|
+
/**
|
|
4237
|
+
* Font files passed to Satori.
|
|
4238
|
+
*
|
|
4239
|
+
* Satori cannot render text without at least one font. When omitted,
|
|
4240
|
+
* Ox Content tries a small set of system font paths unless
|
|
4241
|
+
* `systemFontFallback` is disabled.
|
|
4242
|
+
*/
|
|
4243
|
+
fonts?: OgImageSatoriFont[];
|
|
4244
|
+
/**
|
|
4245
|
+
* Try known OS font paths when `fonts` is empty.
|
|
4246
|
+
* @default true
|
|
4247
|
+
*/
|
|
4248
|
+
systemFontFallback?: boolean;
|
|
4249
|
+
}
|
|
1975
4250
|
/**
|
|
1976
4251
|
* OG image generation options.
|
|
1977
|
-
* Uses Chromium
|
|
4252
|
+
* Uses Chromium or Satori rendering with customizable templates.
|
|
1978
4253
|
*/
|
|
1979
4254
|
interface OgImageOptions {
|
|
4255
|
+
/**
|
|
4256
|
+
* Rendering backend.
|
|
4257
|
+
* - `"chromium"`: full browser rendering, best template compatibility
|
|
4258
|
+
* - `"satori"`: fast HTML-to-SVG-to-PNG rendering, limited CSS subset
|
|
4259
|
+
* @default "chromium"
|
|
4260
|
+
*/
|
|
4261
|
+
renderer?: OgImageRenderer;
|
|
1980
4262
|
/**
|
|
1981
4263
|
* Path to a custom template file (.ts, .vue, .svelte, .tsx/.jsx).
|
|
1982
4264
|
* - `.ts`: default-export a function `(props) => string`
|
|
@@ -2014,17 +4296,26 @@ interface OgImageOptions {
|
|
|
2014
4296
|
* @default 1
|
|
2015
4297
|
*/
|
|
2016
4298
|
concurrency?: number;
|
|
4299
|
+
/**
|
|
4300
|
+
* Options for the Satori renderer.
|
|
4301
|
+
*/
|
|
4302
|
+
satori?: OgImageSatoriOptions;
|
|
2017
4303
|
}
|
|
2018
4304
|
/**
|
|
2019
4305
|
* Resolved OG image options with all defaults applied.
|
|
2020
4306
|
*/
|
|
2021
4307
|
interface ResolvedOgImageOptions$1 {
|
|
4308
|
+
renderer: OgImageRenderer;
|
|
2022
4309
|
template?: string;
|
|
2023
4310
|
vuePlugin: "vitejs" | "vizejs";
|
|
2024
4311
|
width: number;
|
|
2025
4312
|
height: number;
|
|
2026
4313
|
cache: boolean;
|
|
2027
4314
|
concurrency: number;
|
|
4315
|
+
satori: {
|
|
4316
|
+
fonts: OgImageSatoriFont[];
|
|
4317
|
+
systemFontFallback: boolean;
|
|
4318
|
+
};
|
|
2028
4319
|
}
|
|
2029
4320
|
/**
|
|
2030
4321
|
* Custom AST transformer.
|
|
@@ -2065,6 +4356,30 @@ interface MarkdownNode {
|
|
|
2065
4356
|
value?: string;
|
|
2066
4357
|
[key: string]: unknown;
|
|
2067
4358
|
}
|
|
4359
|
+
/**
|
|
4360
|
+
* How a specifier was imported from an MDX `import` statement.
|
|
4361
|
+
*/
|
|
4362
|
+
type MdxImportSpecifierKind = "default" | "named" | "namespace";
|
|
4363
|
+
/**
|
|
4364
|
+
* One binding created by an MDX `import` statement.
|
|
4365
|
+
*/
|
|
4366
|
+
interface MdxImportSpecifier {
|
|
4367
|
+
/** Imported name (`default`, `*`, or the named export). */
|
|
4368
|
+
imported: string;
|
|
4369
|
+
/** Local binding name. */
|
|
4370
|
+
local: string;
|
|
4371
|
+
/** Specifier kind. */
|
|
4372
|
+
kind: MdxImportSpecifierKind;
|
|
4373
|
+
}
|
|
4374
|
+
/**
|
|
4375
|
+
* One MDX `import` statement collected from the AST.
|
|
4376
|
+
*/
|
|
4377
|
+
interface MdxImport {
|
|
4378
|
+
/** Module specifier string. */
|
|
4379
|
+
source: string;
|
|
4380
|
+
/** Bindings created by the import. */
|
|
4381
|
+
specifiers: MdxImportSpecifier[];
|
|
4382
|
+
}
|
|
2068
4383
|
/**
|
|
2069
4384
|
* Transform result.
|
|
2070
4385
|
*/
|
|
@@ -2089,6 +4404,18 @@ interface TransformResult {
|
|
|
2089
4404
|
* Table of contents.
|
|
2090
4405
|
*/
|
|
2091
4406
|
toc: TocEntry[];
|
|
4407
|
+
/**
|
|
4408
|
+
* MDX `import` statements (empty when MDX is off or no ESM nodes).
|
|
4409
|
+
*/
|
|
4410
|
+
imports: MdxImport[];
|
|
4411
|
+
/**
|
|
4412
|
+
* Export names from MDX ESM (empty when MDX is off or no exports).
|
|
4413
|
+
*/
|
|
4414
|
+
exports: string[];
|
|
4415
|
+
/**
|
|
4416
|
+
* Unique JSX component names in document order (empty when none).
|
|
4417
|
+
*/
|
|
4418
|
+
components: string[];
|
|
2092
4419
|
}
|
|
2093
4420
|
/**
|
|
2094
4421
|
* Table of contents entry.
|
|
@@ -2193,6 +4520,15 @@ interface DocsOptions {
|
|
|
2193
4520
|
* @default undefined
|
|
2194
4521
|
*/
|
|
2195
4522
|
entryPoints?: DocsEntryPoint[];
|
|
4523
|
+
/**
|
|
4524
|
+
* Local OpenAPI 3.0/3.1 JSON or YAML files to render as static REST API docs.
|
|
4525
|
+
*
|
|
4526
|
+
* Generated pages are written under `out/openapi/<spec>/` and use the same
|
|
4527
|
+
* Markdown, stale-file cleanup, SSG, and search pipeline as source docs.
|
|
4528
|
+
*
|
|
4529
|
+
* @default false
|
|
4530
|
+
*/
|
|
4531
|
+
openapi?: OpenApiDocsSource | OpenApiDocsSource[] | OpenApiDocsOptions | false;
|
|
2196
4532
|
/**
|
|
2197
4533
|
* Output format.
|
|
2198
4534
|
*
|
|
@@ -2380,6 +4716,7 @@ interface ResolvedDocsOptions {
|
|
|
2380
4716
|
include: string[];
|
|
2381
4717
|
exclude: string[];
|
|
2382
4718
|
entryPoints?: ResolvedDocsEntryPoint[];
|
|
4719
|
+
openapi: ResolvedOpenApiDocsOptions | false;
|
|
2383
4720
|
format: "markdown" | "json" | "html";
|
|
2384
4721
|
private: boolean;
|
|
2385
4722
|
internal: boolean;
|
|
@@ -2408,6 +4745,48 @@ interface ResolvedDocsOptions {
|
|
|
2408
4745
|
singleEntryRoot: "preserve" | "flatten";
|
|
2409
4746
|
generateNav: boolean;
|
|
2410
4747
|
}
|
|
4748
|
+
/** OpenAPI docs shorthand accepted by `docs.openapi`. */
|
|
4749
|
+
type OpenApiDocsSource = string | OpenApiDocsInput;
|
|
4750
|
+
/** One local OpenAPI file consumed by generated REST API docs. */
|
|
4751
|
+
interface OpenApiDocsInput {
|
|
4752
|
+
/** JSON or YAML file path, resolved from the Vite project root. */
|
|
4753
|
+
path: string;
|
|
4754
|
+
/** Optional display name. Defaults to `info.title` or the file name. */
|
|
4755
|
+
name?: string;
|
|
4756
|
+
/** Fail on unresolved or remote `$ref` values. Defaults to `true`. */
|
|
4757
|
+
failOnUnresolvedRefs?: boolean;
|
|
4758
|
+
}
|
|
4759
|
+
/** Object form for configuring generated OpenAPI docs. */
|
|
4760
|
+
interface OpenApiDocsOptions {
|
|
4761
|
+
/** Local OpenAPI files to render. */
|
|
4762
|
+
src?: OpenApiDocsSource | OpenApiDocsSource[];
|
|
4763
|
+
/** Route prefix used by generated OpenAPI nav metadata. Defaults to `basePath` or `/api`. */
|
|
4764
|
+
basePath?: string;
|
|
4765
|
+
/** Default unresolved `$ref` policy for sources. Defaults to `true`. */
|
|
4766
|
+
failOnUnresolvedRefs?: boolean;
|
|
4767
|
+
}
|
|
4768
|
+
/** Resolved local OpenAPI file input. */
|
|
4769
|
+
interface ResolvedOpenApiDocsInput {
|
|
4770
|
+
path: string;
|
|
4771
|
+
name?: string;
|
|
4772
|
+
failOnUnresolvedRefs: boolean;
|
|
4773
|
+
}
|
|
4774
|
+
/** Resolved generated OpenAPI docs options. */
|
|
4775
|
+
interface ResolvedOpenApiDocsOptions {
|
|
4776
|
+
src: ResolvedOpenApiDocsInput[];
|
|
4777
|
+
basePath?: string;
|
|
4778
|
+
}
|
|
4779
|
+
/** Navigation item emitted for generated docs sidebars. */
|
|
4780
|
+
interface DocsNavigationItem {
|
|
4781
|
+
title: string;
|
|
4782
|
+
path: string;
|
|
4783
|
+
children?: DocsNavigationItem[];
|
|
4784
|
+
}
|
|
4785
|
+
/** Generated OpenAPI Markdown pages and sidebar metadata. */
|
|
4786
|
+
interface GeneratedOpenApiDocs {
|
|
4787
|
+
pages: Record<string, string>;
|
|
4788
|
+
nav: DocsNavigationItem[];
|
|
4789
|
+
}
|
|
2411
4790
|
/**
|
|
2412
4791
|
* A single documentation entry extracted from source.
|
|
2413
4792
|
*
|
|
@@ -2690,6 +5069,16 @@ interface SearchOptions {
|
|
|
2690
5069
|
* @default true
|
|
2691
5070
|
*/
|
|
2692
5071
|
prefix?: boolean;
|
|
5072
|
+
/**
|
|
5073
|
+
* Enable fuzzy typo-tolerant matching.
|
|
5074
|
+
*
|
|
5075
|
+
* Fuzzy matching is off by default so large static indexes keep the fastest
|
|
5076
|
+
* exact/prefix path. When enabled, local BM25 also considers near matches
|
|
5077
|
+
* for tokens with at least three characters.
|
|
5078
|
+
*
|
|
5079
|
+
* @default false
|
|
5080
|
+
*/
|
|
5081
|
+
fuzzy?: boolean;
|
|
2693
5082
|
/**
|
|
2694
5083
|
* Placeholder text for the search input.
|
|
2695
5084
|
*
|
|
@@ -2706,6 +5095,50 @@ interface SearchOptions {
|
|
|
2706
5095
|
* @default '/'
|
|
2707
5096
|
*/
|
|
2708
5097
|
hotkey?: string;
|
|
5098
|
+
/**
|
|
5099
|
+
* Search backend used by `virtual:ox-content/search`.
|
|
5100
|
+
*
|
|
5101
|
+
* `"local"` (the default) keeps the static BM25 `search-index.json` client.
|
|
5102
|
+
* `"hosted"` sends queries to a remote index with a public search-only key.
|
|
5103
|
+
* Hosted search is used only when this is set to `"hosted"`.
|
|
5104
|
+
*
|
|
5105
|
+
* @default 'local'
|
|
5106
|
+
*/
|
|
5107
|
+
provider?: "local" | "hosted";
|
|
5108
|
+
/**
|
|
5109
|
+
* Hosted search application id.
|
|
5110
|
+
*
|
|
5111
|
+
* Required when `provider` is `"hosted"`. Also read from
|
|
5112
|
+
* `OX_CONTENT_SEARCH_APP_ID` when omitted here.
|
|
5113
|
+
*/
|
|
5114
|
+
appId?: string;
|
|
5115
|
+
/**
|
|
5116
|
+
* Hosted search index name.
|
|
5117
|
+
*
|
|
5118
|
+
* Required when `provider` is `"hosted"`. Also read from
|
|
5119
|
+
* `OX_CONTENT_SEARCH_INDEX_NAME` when omitted here.
|
|
5120
|
+
*/
|
|
5121
|
+
indexName?: string;
|
|
5122
|
+
/**
|
|
5123
|
+
* Public search-only key for the hosted provider.
|
|
5124
|
+
*
|
|
5125
|
+
* Write and admin keys are rejected. Also read from `OX_CONTENT_SEARCH_KEY`
|
|
5126
|
+
* when omitted here.
|
|
5127
|
+
*/
|
|
5128
|
+
searchKey?: string;
|
|
5129
|
+
/**
|
|
5130
|
+
* Alias for `searchKey`.
|
|
5131
|
+
*
|
|
5132
|
+
* Also read from `OX_CONTENT_SEARCH_PUBLIC_KEY` when omitted here.
|
|
5133
|
+
*/
|
|
5134
|
+
publicKey?: string;
|
|
5135
|
+
/**
|
|
5136
|
+
* HTTP endpoint that receives hosted search queries.
|
|
5137
|
+
*
|
|
5138
|
+
* Also read from `OX_CONTENT_SEARCH_ENDPOINT`. Defaults to `/search` when
|
|
5139
|
+
* hosted credentials are present.
|
|
5140
|
+
*/
|
|
5141
|
+
endpoint?: string;
|
|
2709
5142
|
}
|
|
2710
5143
|
/**
|
|
2711
5144
|
* Resolved search options.
|
|
@@ -2714,8 +5147,15 @@ interface ResolvedSearchOptions {
|
|
|
2714
5147
|
enabled: boolean;
|
|
2715
5148
|
limit: number;
|
|
2716
5149
|
prefix: boolean;
|
|
5150
|
+
fuzzy: boolean;
|
|
2717
5151
|
placeholder: string;
|
|
2718
5152
|
hotkey: string;
|
|
5153
|
+
provider?: "local" | "hosted";
|
|
5154
|
+
appId?: string;
|
|
5155
|
+
indexName?: string;
|
|
5156
|
+
searchKey?: string;
|
|
5157
|
+
publicKey?: string;
|
|
5158
|
+
endpoint?: string;
|
|
2719
5159
|
}
|
|
2720
5160
|
/**
|
|
2721
5161
|
* Search document structure.
|
|
@@ -2861,6 +5301,33 @@ interface ResolvedI18nOptions {
|
|
|
2861
5301
|
check: boolean;
|
|
2862
5302
|
functionNames: string[];
|
|
2863
5303
|
}
|
|
5304
|
+
/**
|
|
5305
|
+
* One host-owned page for composable SSG outputs (`ssg: false`).
|
|
5306
|
+
*
|
|
5307
|
+
* The host renders HTML. Ox Content plans and emits resources, Markdown
|
|
5308
|
+
* companions, feeds, and sitemap metadata from these fields.
|
|
5309
|
+
*/
|
|
5310
|
+
interface SsgOutputPageInput {
|
|
5311
|
+
/** Source file used for git lastmod and companion identity. */
|
|
5312
|
+
inputPath: string;
|
|
5313
|
+
/** Published URL path (`guide` or `/`). */
|
|
5314
|
+
urlPath: string;
|
|
5315
|
+
/** Filesystem path of the host-rendered HTML page. */
|
|
5316
|
+
outputPath?: string;
|
|
5317
|
+
/** Host-rendered HTML. Required for resource fingerprinting. */
|
|
5318
|
+
html?: string;
|
|
5319
|
+
/** Already-read Markdown source bytes for companions. */
|
|
5320
|
+
source?: string;
|
|
5321
|
+
title?: string;
|
|
5322
|
+
description?: string;
|
|
5323
|
+
/** Absolute page URL. When omitted, `siteUrl` + `base` + `urlPath` is used. */
|
|
5324
|
+
loc?: string;
|
|
5325
|
+
/** Git commit time in milliseconds, or a host-supplied timestamp. */
|
|
5326
|
+
lastUpdated?: number;
|
|
5327
|
+
draft?: boolean;
|
|
5328
|
+
unlisted?: boolean;
|
|
5329
|
+
frontmatter?: Record<string, unknown>;
|
|
5330
|
+
}
|
|
2864
5331
|
//#endregion
|
|
2865
5332
|
//#region src/virtual.d.ts
|
|
2866
5333
|
declare module "virtual:ox-content/collections" {
|
|
@@ -2896,6 +5363,51 @@ declare module "virtual:ox-content/collections" {
|
|
|
2896
5363
|
export default api;
|
|
2897
5364
|
}
|
|
2898
5365
|
//#endregion
|
|
5366
|
+
//#region src/resolve-options.d.ts
|
|
5367
|
+
declare function resolveBuiltinEmbedOptions(options: OxContentOptions["embeds"]): ResolvedOptions["embeds"];
|
|
5368
|
+
declare function resolveMathOptions(options: OxContentOptions["math"]): ResolvedOptions["math"];
|
|
5369
|
+
declare function resolveBadgeOptions(options: OxContentOptions["badges"]): ResolvedOptions["badges"];
|
|
5370
|
+
declare function resolveKeyboardKeysOptions(options: OxContentOptions["keyboardKeys"]): NonNullable<ResolvedOptions["keyboardKeys"]>;
|
|
5371
|
+
//#endregion
|
|
5372
|
+
//#region src/abbreviations-options.d.ts
|
|
5373
|
+
declare function resolveAbbreviationsOptions(options: OxContentOptions["abbreviations"]): ResolvedAbbreviationsOptions;
|
|
5374
|
+
//#endregion
|
|
5375
|
+
//#region src/not-by-ai-options.d.ts
|
|
5376
|
+
declare function resolveNotByAiOptions(options: OxContentOptions["notByAi"]): ResolvedOptions["notByAi"];
|
|
5377
|
+
//#endregion
|
|
5378
|
+
//#region src/card-options.d.ts
|
|
5379
|
+
declare function resolveCardOptions(options: OxContentOptions["cards"]): ResolvedOptions["cards"];
|
|
5380
|
+
//#endregion
|
|
5381
|
+
//#region src/include-options.d.ts
|
|
5382
|
+
declare function resolveIncludeOptions(options: OxContentOptions["includes"]): ResolvedOptions["includes"];
|
|
5383
|
+
//#endregion
|
|
5384
|
+
//#region src/partials-options.d.ts
|
|
5385
|
+
declare function resolvePartialsOptions(options: OxContentOptions["partials"]): NonNullable<ResolvedOptions["partials"]>;
|
|
5386
|
+
//#endregion
|
|
5387
|
+
//#region src/step-options.d.ts
|
|
5388
|
+
declare function resolveStepsOptions(options: OxContentOptions["steps"]): ResolvedOptions["steps"];
|
|
5389
|
+
//#endregion
|
|
5390
|
+
//#region src/code-group-options.d.ts
|
|
5391
|
+
declare function resolveCodeGroupOptions(options: OxContentOptions["codeGroups"]): ResolvedCodeGroupOptions;
|
|
5392
|
+
//#endregion
|
|
5393
|
+
//#region src/file-tree-options.d.ts
|
|
5394
|
+
declare function resolveFileTreeOptions(options: OxContentOptions["fileTree"]): ResolvedOptions["fileTree"];
|
|
5395
|
+
//#endregion
|
|
5396
|
+
//#region src/data-table-options.d.ts
|
|
5397
|
+
declare function resolveDataTableOptions(options: OxContentOptions["dataTables"]): ResolvedOptions["dataTables"];
|
|
5398
|
+
//#endregion
|
|
5399
|
+
//#region src/image-gallery-options.d.ts
|
|
5400
|
+
declare function resolveImageGalleryOptions(options: OxContentOptions["imageGalleries"]): ResolvedImageGalleryOptions;
|
|
5401
|
+
//#endregion
|
|
5402
|
+
//#region src/timeline-options.d.ts
|
|
5403
|
+
declare function resolveTimelineOptions(options: OxContentOptions["timelines"]): ResolvedTimelineOptions;
|
|
5404
|
+
//#endregion
|
|
5405
|
+
//#region src/heading-permalinks-options.d.ts
|
|
5406
|
+
declare function resolveHeadingPermalinksOptions(options: OxContentOptions["headingPermalinks"]): ResolvedOptions["headingPermalinks"];
|
|
5407
|
+
//#endregion
|
|
5408
|
+
//#region src/typed-hover.d.ts
|
|
5409
|
+
declare function resolveTypedHoverOptions(options: OxContentOptions["typedHover"]): ResolvedTypedHoverOptions;
|
|
5410
|
+
//#endregion
|
|
2899
5411
|
//#region src/environment.d.ts
|
|
2900
5412
|
/**
|
|
2901
5413
|
* Creates the Markdown processing environment configuration.
|
|
@@ -2928,6 +5440,11 @@ interface IncrementalMarkdownParserOptions {
|
|
|
2928
5440
|
* @default true
|
|
2929
5441
|
*/
|
|
2930
5442
|
gfm?: boolean;
|
|
5443
|
+
/**
|
|
5444
|
+
* Enable MDX JSX, ESM, and expression nodes.
|
|
5445
|
+
* @default false
|
|
5446
|
+
*/
|
|
5447
|
+
mdx?: boolean;
|
|
2931
5448
|
/**
|
|
2932
5449
|
* Enable footnotes.
|
|
2933
5450
|
* @default true
|
|
@@ -3057,6 +5574,9 @@ declare function renderMarkdownStream(chunks: MarkdownChunkSource, options?: Inc
|
|
|
3057
5574
|
* - `html` (string): Rendered HTML content with all enhancements applied
|
|
3058
5575
|
* - `frontmatter` (object): Parsed YAML frontmatter as JavaScript object
|
|
3059
5576
|
* - `toc` (array): Hierarchical table of contents entries
|
|
5577
|
+
* - `imports` (array): MDX import statements (`source` + specifiers)
|
|
5578
|
+
* - `exports` (array): MDX export names
|
|
5579
|
+
* - `components` (array): Unique JSX component names
|
|
3060
5580
|
* - `render` (function): Client-side render function for dynamic updates
|
|
3061
5581
|
*
|
|
3062
5582
|
* ## Markdown Features Supported
|
|
@@ -3104,7 +5624,6 @@ declare function renderMarkdownStream(chunks: MarkdownChunkSource, options?: Inc
|
|
|
3104
5624
|
*
|
|
3105
5625
|
* const options = resolveOptions({
|
|
3106
5626
|
* highlight: true,
|
|
3107
|
-
* highlightTheme: 'github-dark',
|
|
3108
5627
|
* toc: true,
|
|
3109
5628
|
* gfm: true,
|
|
3110
5629
|
* mermaid: true,
|
|
@@ -3132,6 +5651,158 @@ interface SsgTransformOptions {
|
|
|
3132
5651
|
}
|
|
3133
5652
|
declare function transformMarkdown(source: string, filePath: string, options: ResolvedOptions, ssgOptions?: SsgTransformOptions): Promise<TransformResult>;
|
|
3134
5653
|
//#endregion
|
|
5654
|
+
//#region src/render-markdown.d.ts
|
|
5655
|
+
/**
|
|
5656
|
+
* Processor that resolves `OxContentOptions` once and renders many documents.
|
|
5657
|
+
*/
|
|
5658
|
+
interface MarkdownProcessor {
|
|
5659
|
+
render(source: string, filePath: string): Promise<TransformResult>;
|
|
5660
|
+
}
|
|
5661
|
+
/**
|
|
5662
|
+
* Resolves public options once so custom `ssg: false` hosts can reuse the pipeline.
|
|
5663
|
+
*/
|
|
5664
|
+
declare function createMarkdownProcessor(options?: OxContentOptions): MarkdownProcessor;
|
|
5665
|
+
/**
|
|
5666
|
+
* Run the Vite plugin Markdown/MDX pipeline from public `OxContentOptions`.
|
|
5667
|
+
*
|
|
5668
|
+
* Returns structured `TransformResult` fields (`html`, `frontmatter`, `toc`,
|
|
5669
|
+
* MDX metadata) so consumers do not need to cast a Vite hook or parse
|
|
5670
|
+
* generated module source. `.md` / `.mdx` inference matches `oxContent()`.
|
|
5671
|
+
*/
|
|
5672
|
+
declare function renderMarkdown(source: string, filePath: string, options?: OxContentOptions): Promise<TransformResult>;
|
|
5673
|
+
//#endregion
|
|
5674
|
+
//#region src/markdown.d.ts
|
|
5675
|
+
declare const DEFAULT_MARKDOWN_EXTENSIONS: readonly [".md", ".markdown", ".mdx"];
|
|
5676
|
+
declare function normalizeMarkdownExtensions(extensions?: readonly string[]): string[];
|
|
5677
|
+
declare function isMarkdownFilePath(filePath: string, extensions?: readonly string[]): boolean;
|
|
5678
|
+
/** Returns true when a resource id points at an MDX source file. */
|
|
5679
|
+
declare function isMdxFilePath(filePath: string): boolean;
|
|
5680
|
+
/** Explicit configuration wins; otherwise MDX follows the source extension. */
|
|
5681
|
+
declare function resolveMdxForFilePath(filePath: string, configured?: boolean): boolean;
|
|
5682
|
+
declare function stripMarkdownExtension(filePath: string, extensions?: readonly string[]): string;
|
|
5683
|
+
//#endregion
|
|
5684
|
+
//#region src/mdx-islands.d.ts
|
|
5685
|
+
/**
|
|
5686
|
+
* Discover registered MDX islands from the mdast tree or rendered HTML.
|
|
5687
|
+
*
|
|
5688
|
+
* Framework plugins use this instead of a source regex when MDX is on, so
|
|
5689
|
+
* nested JSX, expression attributes, and fragments stay visible. Names that
|
|
5690
|
+
* are not in the global `components` map and are not document-local import
|
|
5691
|
+
* bindings are left as static HTML.
|
|
5692
|
+
*/
|
|
5693
|
+
/** Global component map: object, Map, or name list. */
|
|
5694
|
+
type ComponentRegistry = Readonly<Record<string, unknown>> | ReadonlyMap<string, unknown> | Iterable<string>;
|
|
5695
|
+
/**
|
|
5696
|
+
* Collect named MDX JSX tags from a parsed mdast tree (JSON from NAPI `parse()`).
|
|
5697
|
+
* Fragments (`name: null`) and non-JSX nodes are ignored. Walks nested children
|
|
5698
|
+
* so inner islands are found.
|
|
5699
|
+
*/
|
|
5700
|
+
declare function collectMdxJsxNamesFromAst(ast: unknown): string[];
|
|
5701
|
+
/**
|
|
5702
|
+
* Collect `data-ox-island` names from Rust-rendered HTML.
|
|
5703
|
+
* Used when an AST walk is unavailable.
|
|
5704
|
+
*/
|
|
5705
|
+
declare function collectMdxIslandNamesFromHtml(html: string): string[];
|
|
5706
|
+
/** Keep names that exist on the global component map, in first-seen order. */
|
|
5707
|
+
declare function intersectRegisteredComponentNames(names: Iterable<string>, components: ComponentRegistry): string[];
|
|
5708
|
+
/**
|
|
5709
|
+
* Keep names that are either globally registered or document-local bindings.
|
|
5710
|
+
*/
|
|
5711
|
+
declare function intersectHydratableComponentNames(names: Iterable<string>, components: ComponentRegistry, localNames?: Iterable<string>): string[];
|
|
5712
|
+
interface DiscoverRegisteredMdxComponentsInput {
|
|
5713
|
+
/** Markdown/MDX body (frontmatter already stripped). */
|
|
5714
|
+
source: string;
|
|
5715
|
+
/** Rendered HTML, used when `parse()` is missing or the AST walk fails. */
|
|
5716
|
+
html?: string;
|
|
5717
|
+
components: ComponentRegistry;
|
|
5718
|
+
/** Document-local import bindings. These override the global map for this file. */
|
|
5719
|
+
localNames?: Iterable<string>;
|
|
5720
|
+
}
|
|
5721
|
+
/**
|
|
5722
|
+
* Resolve registered island names for an MDX document.
|
|
5723
|
+
*
|
|
5724
|
+
* Prefers a NAPI `parse()` AST walk. Falls back to rendered `data-ox-island`
|
|
5725
|
+
* names so plugins still hydrate if #659 metadata is not present.
|
|
5726
|
+
*/
|
|
5727
|
+
declare function discoverRegisteredMdxComponents(input: DiscoverRegisteredMdxComponentsInput): Promise<string[]>;
|
|
5728
|
+
declare function isRegisteredComponent(name: string, components: ComponentRegistry): boolean;
|
|
5729
|
+
//#endregion
|
|
5730
|
+
//#region src/document-imports.d.ts
|
|
5731
|
+
interface ResolveDocumentComponentImportsInput {
|
|
5732
|
+
imports: readonly MdxImport[];
|
|
5733
|
+
documentPath: string;
|
|
5734
|
+
contentRoot?: string;
|
|
5735
|
+
srcDir?: string;
|
|
5736
|
+
}
|
|
5737
|
+
interface ResolvedDocumentComponentImport {
|
|
5738
|
+
localName: string;
|
|
5739
|
+
specifier: string;
|
|
5740
|
+
resolvedPath: string;
|
|
5741
|
+
importPathRelativeToDocument: string;
|
|
5742
|
+
imported: string;
|
|
5743
|
+
kind: Exclude<MdxImportSpecifierKind, "namespace">;
|
|
5744
|
+
}
|
|
5745
|
+
type DocumentImportDiagnosticCode = "not-relative" | "escapes-root" | "duplicate-binding";
|
|
5746
|
+
interface DocumentImportDiagnostic {
|
|
5747
|
+
code: DocumentImportDiagnosticCode;
|
|
5748
|
+
message: string;
|
|
5749
|
+
specifier: string;
|
|
5750
|
+
localName?: string;
|
|
5751
|
+
}
|
|
5752
|
+
interface ResolveDocumentComponentImportsResult {
|
|
5753
|
+
bindings: ResolvedDocumentComponentImport[];
|
|
5754
|
+
diagnostics: DocumentImportDiagnostic[];
|
|
5755
|
+
}
|
|
5756
|
+
declare function resolveContentRootPath(input: {
|
|
5757
|
+
contentRoot?: string;
|
|
5758
|
+
srcDir?: string;
|
|
5759
|
+
root?: string;
|
|
5760
|
+
}): string;
|
|
5761
|
+
declare function stripViteQuery(id: string): string;
|
|
5762
|
+
declare function resolveDocumentComponentImports(input: ResolveDocumentComponentImportsInput): ResolveDocumentComponentImportsResult;
|
|
5763
|
+
//#endregion
|
|
5764
|
+
//#region src/document-islands.d.ts
|
|
5765
|
+
interface DiscoverDocumentMdxIslandsInput {
|
|
5766
|
+
source: string;
|
|
5767
|
+
html?: string;
|
|
5768
|
+
components: ComponentRegistry;
|
|
5769
|
+
imports: readonly MdxImport[];
|
|
5770
|
+
documentPath: string;
|
|
5771
|
+
contentRoot?: string;
|
|
5772
|
+
srcDir?: string;
|
|
5773
|
+
root?: string;
|
|
5774
|
+
}
|
|
5775
|
+
interface DiscoverDocumentMdxIslandsResult {
|
|
5776
|
+
usedComponents: string[];
|
|
5777
|
+
localBindings: Map<string, ResolvedDocumentComponentImport>;
|
|
5778
|
+
diagnostics: DocumentImportDiagnostic[];
|
|
5779
|
+
}
|
|
5780
|
+
declare function discoverDocumentMdxIslands(input: DiscoverDocumentMdxIslandsInput): Promise<DiscoverDocumentMdxIslandsResult>;
|
|
5781
|
+
//#endregion
|
|
5782
|
+
//#region src/island-codegen.d.ts
|
|
5783
|
+
type GlobalComponentMap = Readonly<Record<string, string>> | ReadonlyMap<string, string>;
|
|
5784
|
+
interface RenderIslandComponentImportsInput {
|
|
5785
|
+
globalComponents: GlobalComponentMap;
|
|
5786
|
+
localBindings?: ReadonlyMap<string, ResolvedDocumentComponentImport>;
|
|
5787
|
+
documentPath: string;
|
|
5788
|
+
root?: string;
|
|
5789
|
+
}
|
|
5790
|
+
declare function renderIslandComponentImports(usedComponents: readonly string[], input: RenderIslandComponentImportsInput): string;
|
|
5791
|
+
//#endregion
|
|
5792
|
+
//#region src/island-ssr.d.ts
|
|
5793
|
+
/**
|
|
5794
|
+
* Optional adapter-side island SSR.
|
|
5795
|
+
*
|
|
5796
|
+
* Framework plugins may supply `renderIsland` to replace island inner HTML at
|
|
5797
|
+
* transform time. This helper stays framework-neutral and does not import a
|
|
5798
|
+
* framework SSR runtime.
|
|
5799
|
+
*/
|
|
5800
|
+
type RenderIslandFn = (name: string, props: Record<string, unknown>, filePath: string) => string | Promise<string>;
|
|
5801
|
+
declare function applyIslandSsrHtml(html: string, renderIsland: RenderIslandFn, filePath: string, names?: Iterable<string>): Promise<string>;
|
|
5802
|
+
//#endregion
|
|
5803
|
+
//#region src/resolve-image-options.d.ts
|
|
5804
|
+
declare function resolveImageOptions(options: OxContentOptions["images"]): ResolvedOptions["images"];
|
|
5805
|
+
//#endregion
|
|
3135
5806
|
//#region src/framework.d.ts
|
|
3136
5807
|
type FrameworkRenderTarget = "html" | "native";
|
|
3137
5808
|
type FrameworkCodegenTarget = "react" | "vue" | "svelte";
|
|
@@ -3153,6 +5824,10 @@ interface FrameworkMarkdownOptions {
|
|
|
3153
5824
|
github?: ResolvedOptions["embeds"]["github"];
|
|
3154
5825
|
openGraph?: ResolvedOptions["embeds"]["openGraph"];
|
|
3155
5826
|
};
|
|
5827
|
+
math?: boolean | {
|
|
5828
|
+
enabled?: boolean;
|
|
5829
|
+
};
|
|
5830
|
+
mdx?: boolean;
|
|
3156
5831
|
}
|
|
3157
5832
|
interface FrameworkComponentIsland {
|
|
3158
5833
|
name: string;
|
|
@@ -3434,10 +6109,14 @@ declare function extractDocs(srcDirs: string[], options: ResolvedDocsOptions): P
|
|
|
3434
6109
|
* Generates Markdown documentation from extracted docs.
|
|
3435
6110
|
*/
|
|
3436
6111
|
declare function generateMarkdown(docs: ExtractedDocs[], options: ResolvedDocsOptions): Record<string, string>;
|
|
6112
|
+
/**
|
|
6113
|
+
* Generates Markdown documentation from local OpenAPI 3.0/3.1 files.
|
|
6114
|
+
*/
|
|
6115
|
+
declare function generateOpenApiDocs(options: ResolvedDocsOptions, root?: string): GeneratedOpenApiDocs;
|
|
3437
6116
|
/**
|
|
3438
6117
|
* Writes generated documentation to the output directory.
|
|
3439
6118
|
*/
|
|
3440
|
-
declare function writeDocs(docs: Record<string, string>, outDir: string, extractedDocs?: ExtractedDocs[], options?: ResolvedDocsOptions): Promise<void>;
|
|
6119
|
+
declare function writeDocs(docs: Record<string, string>, outDir: string, extractedDocs?: ExtractedDocs[], options?: ResolvedDocsOptions, extraNav?: DocsNavigationItem[]): Promise<void>;
|
|
3441
6120
|
/**
|
|
3442
6121
|
* Resolves docs options with defaults.
|
|
3443
6122
|
*/
|
|
@@ -3579,6 +6258,12 @@ interface MarkdownLintOptions {
|
|
|
3579
6258
|
* @default {}
|
|
3580
6259
|
*/
|
|
3581
6260
|
dictionary?: MarkdownLintDictionaryOptions;
|
|
6261
|
+
/**
|
|
6262
|
+
* Enable MDX-aware syntax masking while linting visible prose.
|
|
6263
|
+
* File-oriented APIs infer this from `.mdx` when omitted.
|
|
6264
|
+
* @default false for content APIs; inferred for file APIs
|
|
6265
|
+
*/
|
|
6266
|
+
mdx?: boolean;
|
|
3582
6267
|
}
|
|
3583
6268
|
/**
|
|
3584
6269
|
* A single Markdown lint diagnostic.
|
|
@@ -3756,6 +6441,306 @@ interface SsgBuildResult {
|
|
|
3756
6441
|
*/
|
|
3757
6442
|
declare function buildSsg(options: ResolvedOptions, root: string): Promise<SsgBuildResult>;
|
|
3758
6443
|
//#endregion
|
|
6444
|
+
//#region src/page-head.d.ts
|
|
6445
|
+
/** How invalid head descriptors are reported. */
|
|
6446
|
+
type HeadValidationMode = false | "off" | "warn" | "strict";
|
|
6447
|
+
interface SiteHead {
|
|
6448
|
+
name?: string;
|
|
6449
|
+
url?: string;
|
|
6450
|
+
locale?: string;
|
|
6451
|
+
titleTemplate?: string;
|
|
6452
|
+
}
|
|
6453
|
+
interface HeadMeta {
|
|
6454
|
+
key?: string;
|
|
6455
|
+
name?: string;
|
|
6456
|
+
property?: string;
|
|
6457
|
+
httpEquiv?: string;
|
|
6458
|
+
content: string;
|
|
6459
|
+
}
|
|
6460
|
+
interface HeadLink {
|
|
6461
|
+
key?: string;
|
|
6462
|
+
rel: string;
|
|
6463
|
+
href: string;
|
|
6464
|
+
hreflang?: string;
|
|
6465
|
+
type?: string;
|
|
6466
|
+
sizes?: string;
|
|
6467
|
+
}
|
|
6468
|
+
interface HeadAlternate {
|
|
6469
|
+
lang: string;
|
|
6470
|
+
href: string;
|
|
6471
|
+
}
|
|
6472
|
+
interface HeadJsonLd {
|
|
6473
|
+
key?: string;
|
|
6474
|
+
json: string;
|
|
6475
|
+
}
|
|
6476
|
+
/**
|
|
6477
|
+
* Build-time page-head input. Unhead-shaped, no client runtime.
|
|
6478
|
+
*
|
|
6479
|
+
* Unknown keys such as `twitter.imggg` are a TypeScript error here. Use
|
|
6480
|
+
* `metas` / `links` for extra tags.
|
|
6481
|
+
*/
|
|
6482
|
+
interface HeadInput {
|
|
6483
|
+
site?: SiteHead;
|
|
6484
|
+
title?: string;
|
|
6485
|
+
titleTemplate?: string;
|
|
6486
|
+
titleSuffix?: boolean;
|
|
6487
|
+
description?: string;
|
|
6488
|
+
canonical?: string;
|
|
6489
|
+
robots?: string;
|
|
6490
|
+
ogImage?: string;
|
|
6491
|
+
ogType?: string;
|
|
6492
|
+
twitterCard?: "summary" | "summary_large_image" | (string & {});
|
|
6493
|
+
social?: boolean;
|
|
6494
|
+
emitSiteName?: boolean;
|
|
6495
|
+
trusted?: boolean;
|
|
6496
|
+
metas?: HeadMeta[];
|
|
6497
|
+
links?: HeadLink[];
|
|
6498
|
+
alternates?: HeadAlternate[];
|
|
6499
|
+
jsonLd?: HeadJsonLd[];
|
|
6500
|
+
validation?: "off" | "warn" | "strict";
|
|
6501
|
+
}
|
|
6502
|
+
interface HeadDiagnostic {
|
|
6503
|
+
strict: boolean;
|
|
6504
|
+
message: string;
|
|
6505
|
+
}
|
|
6506
|
+
interface RenderedHead {
|
|
6507
|
+
html: string;
|
|
6508
|
+
diagnostics: HeadDiagnostic[];
|
|
6509
|
+
}
|
|
6510
|
+
/** Resolve descriptors to escaped `<head>` markup. Build-time only. */
|
|
6511
|
+
declare function renderHead(input: HeadInput): RenderedHead;
|
|
6512
|
+
declare function resolveHeadValidation(value: HeadValidationMode | undefined): false | "warn" | "strict";
|
|
6513
|
+
//#endregion
|
|
6514
|
+
//#region src/not-found.d.ts
|
|
6515
|
+
/**
|
|
6516
|
+
* Resolves `ssg.notFound` with defaults.
|
|
6517
|
+
*
|
|
6518
|
+
* `false` / omitted stays off. `true` enables `404.md` → `404.html`. An object
|
|
6519
|
+
* enables the feature and overrides only the fields the site set.
|
|
6520
|
+
*/
|
|
6521
|
+
declare function resolveNotFoundOptions(value: boolean | NotFoundOptions | undefined): ResolvedNotFoundOptions;
|
|
6522
|
+
//#endregion
|
|
6523
|
+
//#region src/site-maps.d.ts
|
|
6524
|
+
/** One page considered for crawl manifests. */
|
|
6525
|
+
interface SiteMapPageInput {
|
|
6526
|
+
loc: string;
|
|
6527
|
+
title: string;
|
|
6528
|
+
description?: string;
|
|
6529
|
+
/** Source-file git commit time in milliseconds. Omitted when Git has no history. */
|
|
6530
|
+
lastUpdated?: number;
|
|
6531
|
+
draft?: boolean;
|
|
6532
|
+
unlisted?: boolean;
|
|
6533
|
+
}
|
|
6534
|
+
/** Inputs for writing crawl manifests next to generated HTML. */
|
|
6535
|
+
interface WriteSiteMapFilesInput {
|
|
6536
|
+
outDir: string;
|
|
6537
|
+
siteUrl?: string;
|
|
6538
|
+
base: string;
|
|
6539
|
+
siteName?: string;
|
|
6540
|
+
siteDescription?: string;
|
|
6541
|
+
options?: ResolvedSiteMapsOptions;
|
|
6542
|
+
pages: readonly SiteMapPageInput[];
|
|
6543
|
+
}
|
|
6544
|
+
/**
|
|
6545
|
+
* Resolves `siteMaps` with defaults.
|
|
6546
|
+
*
|
|
6547
|
+
* `false` / omitted stays off. `true` enables all three files. An object
|
|
6548
|
+
* enables the feature and overrides only the fields the site set.
|
|
6549
|
+
*/
|
|
6550
|
+
declare function resolveSiteMapsOptions(value: boolean | SiteMapsOptions | undefined): ResolvedSiteMapsOptions;
|
|
6551
|
+
/** Writes enabled crawl manifests into `outDir`. */
|
|
6552
|
+
declare function writeSiteMapFiles(input: WriteSiteMapFilesInput): Promise<{
|
|
6553
|
+
files: string[];
|
|
6554
|
+
warning?: string;
|
|
6555
|
+
}>;
|
|
6556
|
+
//#endregion
|
|
6557
|
+
//#region src/markdown-source.d.ts
|
|
6558
|
+
/** One page that may receive a source companion. */
|
|
6559
|
+
interface MarkdownSourcePageInput {
|
|
6560
|
+
inputPath: string;
|
|
6561
|
+
/** Already-read source bytes. Omitted pages are skipped. */
|
|
6562
|
+
source?: string;
|
|
6563
|
+
urlPath: string;
|
|
6564
|
+
frontmatter: Record<string, unknown>;
|
|
6565
|
+
}
|
|
6566
|
+
/** Inputs for writing companions next to generated HTML. */
|
|
6567
|
+
interface WriteMarkdownSourceFilesInput {
|
|
6568
|
+
outDir: string;
|
|
6569
|
+
base: string;
|
|
6570
|
+
options?: ResolvedMarkdownSourceOptions | null;
|
|
6571
|
+
publishState?: ResolvedPublishStateOptions;
|
|
6572
|
+
pages: readonly MarkdownSourcePageInput[];
|
|
6573
|
+
}
|
|
6574
|
+
/**
|
|
6575
|
+
* Resolves `ssg.markdownSource` with defaults.
|
|
6576
|
+
*
|
|
6577
|
+
* `false` / omitted stays off. `true` enables companions and the alternate
|
|
6578
|
+
* link. An object enables the feature and overrides only the fields set.
|
|
6579
|
+
*/
|
|
6580
|
+
declare function resolveMarkdownSourceOptions(value: boolean | MarkdownSourceOptions | undefined): ResolvedMarkdownSourceOptions;
|
|
6581
|
+
//#endregion
|
|
6582
|
+
//#region src/publish-state.d.ts
|
|
6583
|
+
/** Split pages into production output vs listing surfaces. */
|
|
6584
|
+
interface PartitionedPages<T> {
|
|
6585
|
+
output: T[];
|
|
6586
|
+
listed: T[];
|
|
6587
|
+
}
|
|
6588
|
+
/**
|
|
6589
|
+
* Resolves `publishState` with defaults.
|
|
6590
|
+
*
|
|
6591
|
+
* `false` / omitted stays off. `true` enables production filtering. An object
|
|
6592
|
+
* enables the feature and overrides only the fields the site set.
|
|
6593
|
+
*/
|
|
6594
|
+
declare function resolvePublishStateOptions(value: boolean | PublishStateOptions | undefined): ResolvedPublishStateOptions;
|
|
6595
|
+
/** Classifies one frontmatter object. Never throws. */
|
|
6596
|
+
declare function classifyPublishState(frontmatter: Record<string, unknown>, options: ResolvedPublishStateOptions | undefined): {
|
|
6597
|
+
output: boolean;
|
|
6598
|
+
listed: boolean;
|
|
6599
|
+
};
|
|
6600
|
+
/** Splits pages into those that write HTML and those that appear in listings. */
|
|
6601
|
+
declare function partitionPublishedPages<T extends {
|
|
6602
|
+
frontmatter: Record<string, unknown>;
|
|
6603
|
+
}>(pages: readonly T[], options: ResolvedPublishStateOptions | undefined): PartitionedPages<T>;
|
|
6604
|
+
//#endregion
|
|
6605
|
+
//#region src/permalinks.d.ts
|
|
6606
|
+
/** Resolves `permalinks`. `false` / omitted stays off. `true` / `{}` enables. */
|
|
6607
|
+
declare function resolvePermalinksOptions(value: boolean | PermalinksOptions | undefined): ResolvedPermalinksOptions;
|
|
6608
|
+
/** Resolves `cascade`. `false` / omitted stays off. `true` / `{}` enables. */
|
|
6609
|
+
declare function resolveCascadeOptions(value: boolean | CascadeOptions | undefined): ResolvedCascadeOptions;
|
|
6610
|
+
//#endregion
|
|
6611
|
+
//#region src/redirects.d.ts
|
|
6612
|
+
/**
|
|
6613
|
+
* Resolves `redirects` with defaults.
|
|
6614
|
+
*
|
|
6615
|
+
* `false` / omitted stays off. `true` or `{}` enables empty defaults.
|
|
6616
|
+
* A path map (`{ "/old": "/new" }`) enables the feature with that map.
|
|
6617
|
+
* `{ map, provider, headers, json, allowExternal }` overrides only set fields.
|
|
6618
|
+
* Pass `env` to inject CI detection without reading the real `process.env`.
|
|
6619
|
+
*/
|
|
6620
|
+
declare function resolveRedirectsOptions(value: boolean | RedirectsOptions | Record<string, string> | undefined, env?: NodeJS.ProcessEnv): ResolvedRedirectsOptions;
|
|
6621
|
+
//#endregion
|
|
6622
|
+
//#region src/feeds.d.ts
|
|
6623
|
+
/** One collection entry considered for a feed. */
|
|
6624
|
+
interface FeedItemInput {
|
|
6625
|
+
title?: string;
|
|
6626
|
+
description?: string;
|
|
6627
|
+
path?: string;
|
|
6628
|
+
loc?: string;
|
|
6629
|
+
date?: unknown;
|
|
6630
|
+
lastUpdated?: unknown;
|
|
6631
|
+
draft?: unknown;
|
|
6632
|
+
unlisted?: unknown;
|
|
6633
|
+
frontmatter?: Record<string, unknown>;
|
|
6634
|
+
}
|
|
6635
|
+
/** Inputs for rendering feed bodies. */
|
|
6636
|
+
interface FeedsRenderInput {
|
|
6637
|
+
options?: ResolvedFeedsOptions | null;
|
|
6638
|
+
siteUrl?: string;
|
|
6639
|
+
siteName?: string;
|
|
6640
|
+
siteDescription?: string;
|
|
6641
|
+
base?: string;
|
|
6642
|
+
collections?: Record<string, readonly FeedItemInput[]>;
|
|
6643
|
+
collectionNames?: readonly string[];
|
|
6644
|
+
items?: readonly FeedItemInput[];
|
|
6645
|
+
publishState?: ResolvedPublishStateOptions;
|
|
6646
|
+
}
|
|
6647
|
+
/** Inputs for writing feeds next to generated HTML. */
|
|
6648
|
+
interface WriteFeedFilesInput extends FeedsRenderInput {
|
|
6649
|
+
outDir: string;
|
|
6650
|
+
base: string;
|
|
6651
|
+
}
|
|
6652
|
+
/**
|
|
6653
|
+
* Resolves `feeds` with defaults.
|
|
6654
|
+
*
|
|
6655
|
+
* `false` / omitted stays off. `true` enables all three formats with
|
|
6656
|
+
* collection `content` (or the first configured collection) and limit 20.
|
|
6657
|
+
* A single object is one default feed. A named record or array writes
|
|
6658
|
+
* multiple feeds.
|
|
6659
|
+
*/
|
|
6660
|
+
declare function resolveFeedsOptions(value: boolean | FeedsOptions | undefined): ResolvedFeedsOptions;
|
|
6661
|
+
/** Writes enabled feed files into `outDir`. */
|
|
6662
|
+
declare function writeFeedFiles(input: WriteFeedFilesInput): Promise<{
|
|
6663
|
+
files: string[];
|
|
6664
|
+
warning?: string;
|
|
6665
|
+
}>;
|
|
6666
|
+
//#endregion
|
|
6667
|
+
//#region src/blog-options.d.ts
|
|
6668
|
+
declare function resolveBlogOptions(value: boolean | BlogOptions | undefined): ResolvedBlogOptions;
|
|
6669
|
+
/**
|
|
6670
|
+
* Picks a collection named `blog`, else the only configured collection.
|
|
6671
|
+
*
|
|
6672
|
+
* An explicit name always wins. Several collections and no `blog` name
|
|
6673
|
+
* require `blog.collection`.
|
|
6674
|
+
*/
|
|
6675
|
+
declare function resolveBlogCollectionName(requested: string | undefined, collectionNames: readonly string[]): string | undefined;
|
|
6676
|
+
//#endregion
|
|
6677
|
+
//#region src/blog-feeds.d.ts
|
|
6678
|
+
declare class BlogFeedError extends Error {
|
|
6679
|
+
readonly issues: string[];
|
|
6680
|
+
constructor(issues: string[]);
|
|
6681
|
+
}
|
|
6682
|
+
//#endregion
|
|
6683
|
+
//#region src/blog-reading.d.ts
|
|
6684
|
+
/**
|
|
6685
|
+
* Deterministic blog reading-time estimates.
|
|
6686
|
+
*/
|
|
6687
|
+
declare function readingTimeMinutes(markdown: string): number;
|
|
6688
|
+
//#endregion
|
|
6689
|
+
//#region src/pwa.d.ts
|
|
6690
|
+
/**
|
|
6691
|
+
* Resolves `pwa` with defaults.
|
|
6692
|
+
*
|
|
6693
|
+
* `false` / omitted stays off. `true` enables the manifest and offline
|
|
6694
|
+
* service worker. An object enables the feature and overrides only the
|
|
6695
|
+
* fields the site set.
|
|
6696
|
+
*/
|
|
6697
|
+
declare function resolvePwaOptions(value: boolean | PwaOptions | undefined): ResolvedPwaOptions;
|
|
6698
|
+
//#endregion
|
|
6699
|
+
//#region src/taxonomies.d.ts
|
|
6700
|
+
/**
|
|
6701
|
+
* Resolves `taxonomies` with defaults.
|
|
6702
|
+
*
|
|
6703
|
+
* `false` / omitted stays off. `true` enables `tags` and `categories` with
|
|
6704
|
+
* relatedLimit 5. An object enables the feature and overrides only set fields.
|
|
6705
|
+
*/
|
|
6706
|
+
declare function resolveTaxonomiesOptions(value: boolean | TaxonomiesOptions | undefined): ResolvedTaxonomiesOptions;
|
|
6707
|
+
//#endregion
|
|
6708
|
+
//#region src/versions.d.ts
|
|
6709
|
+
/**
|
|
6710
|
+
* Resolves `versions`. Omitted / `false` stay off. `true` enables a single
|
|
6711
|
+
* current entry. An object enables the feature and overrides set fields.
|
|
6712
|
+
*/
|
|
6713
|
+
declare function resolveVersionsOptions(value: boolean | VersionsOptions | undefined): ResolvedVersionsOptions;
|
|
6714
|
+
//#endregion
|
|
6715
|
+
//#region src/resources.d.ts
|
|
6716
|
+
declare class PageResourceError extends Error {
|
|
6717
|
+
readonly issues: string[];
|
|
6718
|
+
constructor(issues: string[]);
|
|
6719
|
+
}
|
|
6720
|
+
/**
|
|
6721
|
+
* Resolves `resources`. Omitted / `false` stay off. `true` or `{}` enables
|
|
6722
|
+
* defaults. An object enables the feature and overrides only set fields.
|
|
6723
|
+
*/
|
|
6724
|
+
declare function resolveResourcesOptions(value: boolean | ResourcesOptions | undefined): ResolvedResourcesOptions;
|
|
6725
|
+
//#endregion
|
|
6726
|
+
//#region src/team.d.ts
|
|
6727
|
+
/**
|
|
6728
|
+
* Resolves `ssg.team` with defaults.
|
|
6729
|
+
*
|
|
6730
|
+
* `false` / omitted stays off. `true` enables an empty member list.
|
|
6731
|
+
* An object enables the feature and keeps the members the site set.
|
|
6732
|
+
*/
|
|
6733
|
+
declare function resolveTeamOptions(value: boolean | TeamOptions | undefined): ResolvedTeamOptions;
|
|
6734
|
+
//#endregion
|
|
6735
|
+
//#region src/section-index.d.ts
|
|
6736
|
+
/**
|
|
6737
|
+
* Resolves `ssg.sectionIndex` with defaults.
|
|
6738
|
+
*
|
|
6739
|
+
* `false` / omitted stays off. `true` enables card listings. An object
|
|
6740
|
+
* enables the feature and overrides only the fields the site set.
|
|
6741
|
+
*/
|
|
6742
|
+
declare function resolveSectionIndexOptions(value: boolean | SectionIndexOptions | undefined): ResolvedSectionIndexOptions;
|
|
6743
|
+
//#endregion
|
|
3759
6744
|
//#region src/search.d.ts
|
|
3760
6745
|
/**
|
|
3761
6746
|
* Resolves search options with defaults.
|
|
@@ -3763,8 +6748,12 @@ declare function buildSsg(options: ResolvedOptions, root: string): Promise<SsgBu
|
|
|
3763
6748
|
declare function resolveSearchOptions(options: SearchOptions | boolean | undefined): ResolvedSearchOptions;
|
|
3764
6749
|
/**
|
|
3765
6750
|
* Builds the search index from Markdown files.
|
|
6751
|
+
*
|
|
6752
|
+
* `publishState` is forwarded to the native indexer. `excludeDocumentIds`
|
|
6753
|
+
* then drops matching documents and rebuilds the BM25 index so omitted
|
|
6754
|
+
* pages (such as the opt-in 404 source) are not searchable.
|
|
3766
6755
|
*/
|
|
3767
|
-
declare function buildSearchIndex(srcDir: string, base: string, extensions?: readonly string[]): Promise<string>;
|
|
6756
|
+
declare function buildSearchIndex(srcDir: string, base: string, extensions?: readonly string[], publishState?: ResolvedPublishStateOptions, excludeDocumentIds?: readonly string[], mdx?: boolean): Promise<string>;
|
|
3768
6757
|
/**
|
|
3769
6758
|
* Writes the search index to a file.
|
|
3770
6759
|
*/
|
|
@@ -3777,12 +6766,6 @@ declare function resolveCollectionsOptions(options: CollectionsOptions | boolean
|
|
|
3777
6766
|
declare function buildCollectionManifest(root: string, options: ResolvedOptions): Promise<CollectionManifest>;
|
|
3778
6767
|
declare function generateCollectionsVirtualModule(root: string, options: ResolvedOptions): Promise<string>;
|
|
3779
6768
|
//#endregion
|
|
3780
|
-
//#region src/markdown.d.ts
|
|
3781
|
-
declare const DEFAULT_MARKDOWN_EXTENSIONS: readonly [".md", ".markdown", ".mdx"];
|
|
3782
|
-
declare function normalizeMarkdownExtensions(extensions?: readonly string[]): string[];
|
|
3783
|
-
declare function isMarkdownFilePath(filePath: string, extensions?: readonly string[]): boolean;
|
|
3784
|
-
declare function stripMarkdownExtension(filePath: string, extensions?: readonly string[]): string;
|
|
3785
|
-
//#endregion
|
|
3786
6769
|
//#region src/vitepress.d.ts
|
|
3787
6770
|
interface VitePressLogo {
|
|
3788
6771
|
light?: string;
|
|
@@ -3915,7 +6898,7 @@ declare function generateHydrationScript(components: string[]): string;
|
|
|
3915
6898
|
//#endregion
|
|
3916
6899
|
//#region src/og-image/types.d.ts
|
|
3917
6900
|
/**
|
|
3918
|
-
* Type definitions for
|
|
6901
|
+
* Type definitions for OG image generation.
|
|
3919
6902
|
*/
|
|
3920
6903
|
/**
|
|
3921
6904
|
* Props passed to OG image template functions.
|
|
@@ -3938,10 +6921,66 @@ interface OgImageTemplateProps {
|
|
|
3938
6921
|
* Template function that receives page metadata and returns an HTML string.
|
|
3939
6922
|
*/
|
|
3940
6923
|
type OgImageTemplateFn = (props: OgImageTemplateProps) => string | Promise<string>;
|
|
6924
|
+
/**
|
|
6925
|
+
* OG image rendering backend.
|
|
6926
|
+
*/
|
|
6927
|
+
type OgImageRenderer$1 = "chromium" | "satori";
|
|
6928
|
+
/**
|
|
6929
|
+
* Font weight values supported by Satori.
|
|
6930
|
+
*/
|
|
6931
|
+
type OgImageSatoriFontWeight$1 = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
6932
|
+
/**
|
|
6933
|
+
* Font file loaded by the Satori renderer.
|
|
6934
|
+
*/
|
|
6935
|
+
interface OgImageSatoriFont$1 {
|
|
6936
|
+
/**
|
|
6937
|
+
* Absolute path, or a path relative to the project root.
|
|
6938
|
+
*/
|
|
6939
|
+
path: string;
|
|
6940
|
+
/**
|
|
6941
|
+
* Font family name used by template CSS.
|
|
6942
|
+
*/
|
|
6943
|
+
name?: string;
|
|
6944
|
+
/**
|
|
6945
|
+
* Font weight.
|
|
6946
|
+
* @default 400
|
|
6947
|
+
*/
|
|
6948
|
+
weight?: OgImageSatoriFontWeight$1;
|
|
6949
|
+
/**
|
|
6950
|
+
* Font style.
|
|
6951
|
+
* @default "normal"
|
|
6952
|
+
*/
|
|
6953
|
+
style?: "normal" | "italic";
|
|
6954
|
+
}
|
|
6955
|
+
/**
|
|
6956
|
+
* Satori renderer options.
|
|
6957
|
+
*/
|
|
6958
|
+
interface OgImageSatoriOptions$1 {
|
|
6959
|
+
/**
|
|
6960
|
+
* Font files passed to Satori.
|
|
6961
|
+
*
|
|
6962
|
+
* Satori cannot render text without at least one font. When omitted,
|
|
6963
|
+
* Ox Content tries a small set of system font paths unless
|
|
6964
|
+
* `systemFontFallback` is disabled.
|
|
6965
|
+
*/
|
|
6966
|
+
fonts?: OgImageSatoriFont$1[];
|
|
6967
|
+
/**
|
|
6968
|
+
* Try known OS font paths when `fonts` is empty.
|
|
6969
|
+
* @default true
|
|
6970
|
+
*/
|
|
6971
|
+
systemFontFallback?: boolean;
|
|
6972
|
+
}
|
|
3941
6973
|
/**
|
|
3942
6974
|
* OG image generation options (user-facing).
|
|
3943
6975
|
*/
|
|
3944
6976
|
interface OgImageOptions$1 {
|
|
6977
|
+
/**
|
|
6978
|
+
* Rendering backend.
|
|
6979
|
+
* - `"chromium"`: full browser rendering, best template compatibility
|
|
6980
|
+
* - `"satori"`: fast HTML-to-SVG-to-PNG rendering, limited CSS subset
|
|
6981
|
+
* @default "chromium"
|
|
6982
|
+
*/
|
|
6983
|
+
renderer?: OgImageRenderer$1;
|
|
3945
6984
|
/**
|
|
3946
6985
|
* Path to a custom template file (.ts, .vue, .svelte, .tsx/.jsx).
|
|
3947
6986
|
* - `.ts`: default-export a function `(props) => string`
|
|
@@ -3979,17 +7018,26 @@ interface OgImageOptions$1 {
|
|
|
3979
7018
|
* @default 1
|
|
3980
7019
|
*/
|
|
3981
7020
|
concurrency?: number;
|
|
7021
|
+
/**
|
|
7022
|
+
* Options for the Satori renderer.
|
|
7023
|
+
*/
|
|
7024
|
+
satori?: OgImageSatoriOptions$1;
|
|
3982
7025
|
}
|
|
3983
7026
|
/**
|
|
3984
7027
|
* Resolved OG image options with all defaults applied.
|
|
3985
7028
|
*/
|
|
3986
7029
|
interface ResolvedOgImageOptions {
|
|
7030
|
+
renderer: OgImageRenderer$1;
|
|
3987
7031
|
template?: string;
|
|
3988
7032
|
vuePlugin: "vitejs" | "vizejs";
|
|
3989
7033
|
width: number;
|
|
3990
7034
|
height: number;
|
|
3991
7035
|
cache: boolean;
|
|
3992
7036
|
concurrency: number;
|
|
7037
|
+
satori: {
|
|
7038
|
+
fonts: OgImageSatoriFont$1[];
|
|
7039
|
+
systemFontFallback: boolean;
|
|
7040
|
+
};
|
|
3993
7041
|
}
|
|
3994
7042
|
//#endregion
|
|
3995
7043
|
//#region src/og-image/browser.d.ts
|
|
@@ -4034,7 +7082,7 @@ interface OgImageResult {
|
|
|
4034
7082
|
/**
|
|
4035
7083
|
* Generates OG images for a batch of pages.
|
|
4036
7084
|
*
|
|
4037
|
-
* Manages the full lifecycle: resolve template →
|
|
7085
|
+
* Manages the full lifecycle: resolve template → select renderer →
|
|
4038
7086
|
* render each page (with caching and concurrency).
|
|
4039
7087
|
*
|
|
4040
7088
|
* All errors are non-fatal: failures are reported in results but never throw.
|
|
@@ -4051,6 +7099,115 @@ declare function resolveI18nOptions(options: I18nOptions | false | undefined): R
|
|
|
4051
7099
|
*/
|
|
4052
7100
|
declare function createI18nPlugin(resolvedOptions: ResolvedOptions): Plugin;
|
|
4053
7101
|
//#endregion
|
|
7102
|
+
//#region src/ssg-output-write.d.ts
|
|
7103
|
+
/** One host-rendered page that may receive resource fingerprinting. */
|
|
7104
|
+
interface WriteResourceFilesPage {
|
|
7105
|
+
html: string;
|
|
7106
|
+
inputPath: string;
|
|
7107
|
+
outputPath: string;
|
|
7108
|
+
}
|
|
7109
|
+
/** Inputs for writing fingerprinted page resources from host HTML. */
|
|
7110
|
+
interface WriteResourceFilesInput {
|
|
7111
|
+
pages: readonly WriteResourceFilesPage[];
|
|
7112
|
+
srcDir: string;
|
|
7113
|
+
outDir: string;
|
|
7114
|
+
root?: string;
|
|
7115
|
+
base?: string;
|
|
7116
|
+
options?: ResolvedResourcesOptions | null;
|
|
7117
|
+
cacheDir?: string;
|
|
7118
|
+
}
|
|
7119
|
+
/** Rewritten host pages plus emitted resource paths. */
|
|
7120
|
+
interface WriteResourceFilesResult {
|
|
7121
|
+
pages: WriteResourceFilesPage[];
|
|
7122
|
+
files: string[];
|
|
7123
|
+
errors: string[];
|
|
7124
|
+
}
|
|
7125
|
+
/**
|
|
7126
|
+
* Fingerprint, rewrite, and emit page resources for host-rendered HTML.
|
|
7127
|
+
*
|
|
7128
|
+
* Uses the same `resources` option object and emit path as `buildSsg()`.
|
|
7129
|
+
* Throws `PageResourceError` when `missing: "error"` hits a fatal issue.
|
|
7130
|
+
*/
|
|
7131
|
+
declare function writeResourceFiles(input: WriteResourceFilesInput): Promise<WriteResourceFilesResult>;
|
|
7132
|
+
/**
|
|
7133
|
+
* Write Markdown companions for host-rendered pages.
|
|
7134
|
+
*
|
|
7135
|
+
* Reuses `writeMarkdownSourceFiles` from the copy-as-markdown pipeline.
|
|
7136
|
+
*/
|
|
7137
|
+
declare function writeMarkdownCompanions(input: WriteMarkdownSourceFilesInput): Promise<{
|
|
7138
|
+
files: string[];
|
|
7139
|
+
errors: string[];
|
|
7140
|
+
}>;
|
|
7141
|
+
/**
|
|
7142
|
+
* Git last-commit time for `filePath` in milliseconds.
|
|
7143
|
+
*
|
|
7144
|
+
* Same lookup `buildSsg()` uses for `ssg.lastUpdated` and sitemap `<lastmod>`.
|
|
7145
|
+
* Returns `undefined` when `root` is missing, Git has no history, or NAPI is unavailable.
|
|
7146
|
+
*/
|
|
7147
|
+
declare function resolveGitLastmod(filePath: string, root?: string): number | undefined;
|
|
7148
|
+
//#endregion
|
|
7149
|
+
//#region src/ssg-output.d.ts
|
|
7150
|
+
/** Same option objects `oxContent()` / `buildSsg()` accept. `ssg.enabled` is ignored. */
|
|
7151
|
+
interface PlanSsgOutputsOptions {
|
|
7152
|
+
base?: string;
|
|
7153
|
+
resources?: boolean | ResourcesOptions;
|
|
7154
|
+
feeds?: boolean | FeedsOptions;
|
|
7155
|
+
siteMaps?: boolean | SiteMapsOptions;
|
|
7156
|
+
publishState?: boolean | PublishStateOptions;
|
|
7157
|
+
ssg?: boolean | SsgOptions;
|
|
7158
|
+
}
|
|
7159
|
+
/** Inputs for planning composable SSG outputs from host-rendered pages. */
|
|
7160
|
+
interface PlanSsgOutputsInput {
|
|
7161
|
+
pages: readonly SsgOutputPageInput[];
|
|
7162
|
+
outDir: string;
|
|
7163
|
+
srcDir?: string;
|
|
7164
|
+
root?: string;
|
|
7165
|
+
siteDescription?: string;
|
|
7166
|
+
collections?: Record<string, readonly FeedItemInput[]>;
|
|
7167
|
+
collectionNames?: readonly string[];
|
|
7168
|
+
items?: readonly FeedItemInput[];
|
|
7169
|
+
options?: PlanSsgOutputsOptions | Pick<OxContentOptions, keyof PlanSsgOutputsOptions>;
|
|
7170
|
+
}
|
|
7171
|
+
/** Planned writer inputs. Call the matching `write*` function for each feature. */
|
|
7172
|
+
interface SsgOutputPlan {
|
|
7173
|
+
resources: WriteResourceFilesInput;
|
|
7174
|
+
markdownCompanions: {
|
|
7175
|
+
outDir: string;
|
|
7176
|
+
base: string;
|
|
7177
|
+
options: ResolvedMarkdownSourceOptions;
|
|
7178
|
+
publishState: ResolvedPublishStateOptions;
|
|
7179
|
+
pages: MarkdownSourcePageInput[];
|
|
7180
|
+
};
|
|
7181
|
+
feeds: {
|
|
7182
|
+
outDir: string;
|
|
7183
|
+
base: string;
|
|
7184
|
+
siteUrl?: string;
|
|
7185
|
+
siteName?: string;
|
|
7186
|
+
siteDescription?: string;
|
|
7187
|
+
options: ResolvedFeedsOptions;
|
|
7188
|
+
publishState: ResolvedPublishStateOptions;
|
|
7189
|
+
collections?: Record<string, readonly FeedItemInput[]>;
|
|
7190
|
+
collectionNames?: readonly string[];
|
|
7191
|
+
items?: readonly FeedItemInput[];
|
|
7192
|
+
};
|
|
7193
|
+
siteMaps: {
|
|
7194
|
+
outDir: string;
|
|
7195
|
+
base: string;
|
|
7196
|
+
siteUrl?: string;
|
|
7197
|
+
siteName?: string;
|
|
7198
|
+
siteDescription?: string;
|
|
7199
|
+
options: ResolvedSiteMapsOptions;
|
|
7200
|
+
pages: SiteMapPageInput[];
|
|
7201
|
+
};
|
|
7202
|
+
}
|
|
7203
|
+
/**
|
|
7204
|
+
* Plan resource, companion, feed, and sitemap outputs without rendering pages.
|
|
7205
|
+
*
|
|
7206
|
+
* `ssg.enabled` is ignored. Use `ssg: { enabled: false, markdownSource, lastUpdated, siteUrl }`
|
|
7207
|
+
* so those fields still resolve. `lastUpdated` on a page wins over git.
|
|
7208
|
+
*/
|
|
7209
|
+
declare function planSsgOutputs(input: PlanSsgOutputsInput): SsgOutputPlan;
|
|
7210
|
+
//#endregion
|
|
4054
7211
|
//#region src/index.d.ts
|
|
4055
7212
|
/**
|
|
4056
7213
|
* Creates the Ox Content Vite plugin.
|
|
@@ -4072,11 +7229,10 @@ declare function createI18nPlugin(resolvedOptions: ResolvedOptions): Plugin;
|
|
|
4072
7229
|
* ```
|
|
4073
7230
|
*/
|
|
4074
7231
|
declare function oxContent(options?: OxContentOptions): Plugin[];
|
|
4075
|
-
declare function resolveBuiltinEmbedOptions(options: OxContentOptions["embeds"]): ResolvedOptions["embeds"];
|
|
4076
7232
|
/**
|
|
4077
7233
|
* Generates virtual module content.
|
|
4078
7234
|
*/
|
|
4079
7235
|
declare function generateVirtualModule(path: string, options: ResolvedOptions): string;
|
|
4080
7236
|
//#endregion
|
|
4081
|
-
export { AttrsOptions, type BasePageProps, BuiltinEmbedOptions, BuiltinPmOptions, CodeAnnotationKind, CodeAnnotationSyntax, CodeAnnotationsOptions, type CodeBlockDiagnostic, CodeBlockLintOptions, CodeBlockTypecheckOptions, CodeImportOptions, type CollectedDocsTest, CollectionEntry, CollectionIncludeField, CollectionManifest, CollectionOptions, CollectionQueryBuilder, CollectionQueryOperator, CollectionsOptions, DEFAULT_HTML_TEMPLATE, DEFAULT_MARKDOWN_EXTENSIONS, DefaultTheme, DocEntry, DocMember, DocsEntryPoint, DocsOptions, DocsSortStrategy, DocsSummary, type DocsTestFileOptions, type DocsTestHarnessOptions, DocsTestOptions, DocsTestRunError, type DocsTestRunResult, type DocsTestSource, type DocsTestWriteResult, EditThisPageOptions, EmojiShortcodeOptions, EntryPageConfig, type ExtractedCodeBlock, ExtractedDocs, FeatureConfig, Fragment, type FrameworkCodegenMode, type FrameworkCodegenTarget, type FrameworkComponentIsland, type FrameworkMarkdownOptions, type FrameworkRenderTarget, type FrameworkTransformData, type FrontmatterSchema, type GenerateVitePressMigrationConfigOptions, GeneratedDocsData, type GitHubLineRange, type GitHubOptions, type GitHubRepoData, type GitHubSourceData, type GitHubSourceRef, HeroAction, HeroConfig, HeroImage, HeroNotice, I18nOptions, type IncrementalMarkdownParseAppendOptions, type IncrementalMarkdownParseResult, IncrementalMarkdownParser, type IncrementalMarkdownParserOptions, type IncrementalMarkdownRenderAppendOptions, type IncrementalMarkdownRenderResult, IncrementalMarkdownRenderer, type IncrementalMarkdownRendererOptions, type IslandInfo, type JSXChild, type JSXElementType, type JSXNode, type JSXProps, type LanguageRegistration, type LoadStrategy, LocaleConfig, type MarkdownChunkSource, MarkdownDisplayFormat, type MarkdownLintFileDiagnostic as MarkdownLintBatchDiagnostic, type MarkdownLintFileDiagnostic, type MarkdownLintDiagnostic, type MarkdownLintDictionaryOptions, type MarkdownLintFileOptions, type MarkdownLintFileOptions as MarkdownLintProjectOptions, type MarkdownLintFileResult, type MarkdownLintFilesResult, type MarkdownLintLanguage, type MarkdownLintOptions, type MarkdownLintResult, type MarkdownLintRuleOptions, type MarkdownLintSeverity, type MarkdownLintStandardDictionaryOptions, MarkdownNode, MarkdownTransformer, type MermaidOptions, type NavGroup, NavItem, type OgBrowserSession, OgImageOptions, type OgImagePageEntry, type OgImageOptions$1 as OgImagePluginOptions, type OgImageResult, type OgImageTemplateFn, type OgImageTemplateProps, type OgpData, type OgpOptions, OxContentOptions, type PageData, type PageProps, ParamDoc, type ParseIslandsResult, type RenderContext, ResolvedAttrsOptions, ResolvedBuiltinEmbedOptions, ResolvedCodeAnnotationsOptions, ResolvedCodeBlockLintOptions, ResolvedCodeBlockTypecheckOptions, ResolvedCodeImportOptions, ResolvedCollectionOptions, ResolvedCollectionsOptions, ResolvedDocsEntryPoint, ResolvedDocsOptions, ResolvedDocsTestOptions, ResolvedEditThisPageOptions, ResolvedEmojiShortcodeOptions, ResolvedI18nOptions, ResolvedOgImageOptions, ResolvedOptions, ResolvedSanitizeOptions, ResolvedSearchOptions, ResolvedSsgOptions, type ResolvedThemeConfig, ResolvedWikiLinkOptions, ReturnDoc, type RunDocsTestsOptions, SanitizeOptions, ScopedSearchQuery, SearchDocument, SearchOptions, SearchResult, type SiteConfig, type SocialLinks, SsgNavigationGroup, SsgNavigationItem, SsgOptions, type ThemeColors, type ThemeComponent, type ThemeConfig, type ThemeEmbed, type ThemeEntryPage, type ThemeFonts, type ThemeFooter, type ThemeHeader, type ThemeLayout, type ThemeProps, type ThemeRegistration, type ThemeRenderOptions, type ThemeTokens, ThrowsDoc, TocEntry, type TransformAllOptions, TransformContext, TransformResult, type TwitterEmbedOptions, type TypecheckCodeBlockOptions, type VitePressConfig, type VitePressFooter, type VitePressLogo, type VitePressNavItem, type VitePressSidebar, type VitePressSidebarItem, type VitePressSocialLink, type VitePressThemeConfig, WikiLinkOptions, type WrittenDocsTestFile, type YouTubeOptions, buildCollectionManifest, buildSearchIndex, buildSsg, clearRenderContext, collectDocsTests, collectGitHubRepos, collectGitHubSources, collectOgpUrls, convertVitePressNav, convertVitePressSidebar, createFrameworkMarkdownOptions, createI18nPlugin, createIncrementalMarkdownParser, createIncrementalMarkdownRenderer, createMarkdownEnvironment, createTheme, defaultTheme, defineCollection, defineCollections, defineTheme, each, escapeSvelteMarkup, extractCodeBlocks, extractDocs, extractDocsTests, extractIslandInfo, extractVideoId, fetchGitHubSource, fetchOgpData, fetchRepoData, fromVitePressConfig, generateCollectionsVirtualModule, generateFrontmatterTypes, generateHydrationScript, generateMarkdown, generateOgImages, generateTabsCSS, generateTypes, generateVirtualModule, generateVitePressMigrationConfig, hasIslands, inferType, isMarkdownFilePath, jsx, jsxs, lintCodeBlocks, lintMarkdown, lintMarkdownAsync, lintMarkdownFile, lintMarkdownFiles, mergeThemes, mermaidClientScript, normalizeMarkdownExtensions, normalizeVitePressFrontmatter, oxContent, parseGitHubLineRange, parseGitHubPermalink, prefetchGitHubRepos, prefetchGitHubSources, prefetchOgpData, raw, renderAllPages, renderHtmlToFrameworkCode, renderHtmlToReactComponent, renderHtmlToReactCreateElement, renderHtmlToSvelteComponent, renderHtmlToVueComponent, renderHtmlToVueH, renderMarkdownStream, renderPage, renderToString, resolveBuiltinEmbedOptions, resolveCollectionsOptions, resolveDocsOptions, resolveI18nOptions, resolveOgImageOptions, resolveSearchOptions, resolveSsgOptions, resolveTheme, runDocsTests, setRenderContext, shouldLintMarkdownFile, stripMarkdownExtension, transformAllPlugins, transformGitHub, transformIslands, transformMarkdown, transformMermaidStatic, transformOgp, transformTabs, transformYouTube, typecheckCodeBlocks, useIsActive, useNav, usePageProps, useRenderContext, useSiteConfig, when, writeDocs, writeDocsTestFiles, writeSearchIndex };
|
|
7237
|
+
export { A11yOptions, AbbreviationsOptions, AttrsOptions, BadgeOptions, type BasePageProps, BlogAuthor, BlogFeedError, BlogFeedFailurePolicy, BlogFeedSource, BlogOptions, BuiltinEmbedOptions, BuiltinPmOptions, CardOptions, CascadeOptions, CodeAnnotationKind, CodeAnnotationSyntax, CodeAnnotationsOptions, type CodeBlockDiagnostic, CodeBlockLintOptions, CodeBlockTypecheckOptions, CodeGroupOptions, CodeImportOptions, type CollectedDocsTest, CollectionEntry, CollectionIncludeField, CollectionManifest, CollectionOptions, CollectionQueryBuilder, CollectionQueryOperator, CollectionsOptions, type ComponentRegistry, ContainerOptions, ContainerTypeOptions, ContributorsOptions, DEFAULT_HTML_TEMPLATE, DEFAULT_MARKDOWN_EXTENSIONS, DataTableOptions, DefaultTheme, DefinitionListOptions, type DiscoverDocumentMdxIslandsInput, type DiscoverDocumentMdxIslandsResult, type DiscoverRegisteredMdxComponentsInput, DocEntry, DocMember, DocsEntryPoint, DocsNavigationItem, DocsOptions, DocsSortStrategy, DocsSummary, type DocsTestFileOptions, type DocsTestHarnessOptions, DocsTestOptions, DocsTestRunError, type DocsTestRunResult, type DocsTestSource, type DocsTestWriteResult, type DocumentImportDiagnostic, type DocumentImportDiagnosticCode, EditThisPageOptions, EmojiShortcodeOptions, EntryPageConfig, type ExtractedCodeBlock, ExtractedDocs, FeatureConfig, FeedChannelOptions, FeedFormat, FeedsOptions, FileTreeIconOptions, FileTreeOptions, Fragment, type FrameworkCodegenMode, type FrameworkCodegenTarget, type FrameworkComponentIsland, type FrameworkMarkdownOptions, type FrameworkRenderTarget, type FrameworkTransformData, type FrontmatterSchema, type GenerateVitePressMigrationConfigOptions, GeneratedDocsData, GeneratedOpenApiDocs, type GitHubLineRange, type GitHubOptions, type GitHubRepoData, type GitHubSourceCommit, type GitHubSourceData, type GitHubSourceRef, type GlobalComponentMap, type HeadAlternate, type HeadDiagnostic, type HeadInput, type HeadJsonLd, type HeadLink, type HeadMeta, type HeadValidationMode, type HeaderNavItem, HeadingPermalinksOptions, HeroAction, HeroConfig, HeroImage, HeroNotice, I18nOptions, IconsOptions, ImageGalleryOptions, ImageOptions, IncludeOptions, type IncrementalMarkdownParseAppendOptions, type IncrementalMarkdownParseResult, IncrementalMarkdownParser, type IncrementalMarkdownParserOptions, type IncrementalMarkdownRenderAppendOptions, type IncrementalMarkdownRenderResult, IncrementalMarkdownRenderer, type IncrementalMarkdownRendererOptions, type IslandInfo, type JSXChild, type JSXElementType, type JSXNode, type JSXProps, JsonLdOptions, JsonLdPageType, JsonLdPublisherOptions, KeyboardKeysOptions, type LoadStrategy, LocaleConfig, type LocaleLabel, MagicLinkAlias, MagicLinkImageOverride, MagicLinkOptions, type MarkdownChunkSource, MarkdownDisplayFormat, type MarkdownLintFileDiagnostic as MarkdownLintBatchDiagnostic, type MarkdownLintFileDiagnostic, type MarkdownLintDiagnostic, type MarkdownLintDictionaryOptions, type MarkdownLintFileOptions, type MarkdownLintFileOptions as MarkdownLintProjectOptions, type MarkdownLintFileResult, type MarkdownLintFilesResult, type MarkdownLintLanguage, type MarkdownLintOptions, type MarkdownLintResult, type MarkdownLintRuleOptions, type MarkdownLintSeverity, type MarkdownLintStandardDictionaryOptions, MarkdownNode, type MarkdownProcessor, MarkdownSourceOptions, MarkdownTransformer, MathOptions, MdxImport, MdxImportSpecifier, MdxImportSpecifierKind, type MermaidOptions, type NavGroup, NavItem, NotByAiOptions, NotFoundOptions, type OgBrowserSession, OgImageOptions, type OgImagePageEntry, type OgImageOptions$1 as OgImagePluginOptions, OgImageRenderer, type OgImageResult, OgImageSatoriFont, OgImageSatoriFontWeight, OgImageSatoriOptions, type OgImageTemplateFn, type OgImageTemplateProps, type OgpData, type OgpOptions, OpenApiDocsInput, OpenApiDocsOptions, OpenApiDocsSource, OxContentOptions, type PageChromeFlags, type PageData, type PageProps, PageResourceError, ParamDoc, type ParseIslandsResult, PartialsOptions, PermalinksOptions, type PlanSsgOutputsInput, type PlanSsgOutputsOptions, PublishStateOptions, PwaOptions, ReaderChromeOptions, type RedditEmbedOptions, type RedditPostData, type RedditPostReference, RedirectProvider, RedirectsOptions, type RenderContext, type RenderIslandComponentImportsInput, type RenderIslandFn, type RenderedHead, type ResolveDocumentComponentImportsInput, type ResolveDocumentComponentImportsResult, ResolvedA11y, ResolvedAbbreviationsOptions, ResolvedAttrsOptions, ResolvedBadgeOptions, ResolvedBlogFeedSource, ResolvedBlogOptions, ResolvedBuiltinEmbedOptions, ResolvedCardOptions, ResolvedCascadeOptions, ResolvedCodeAnnotationsOptions, ResolvedCodeBlockLintOptions, ResolvedCodeBlockTypecheckOptions, ResolvedCodeGroupOptions, ResolvedCodeImportOptions, ResolvedCollectionOptions, ResolvedCollectionsOptions, ResolvedContainerOptions, ResolvedContributors, ResolvedDataTableOptions, ResolvedDefinitionListOptions, ResolvedDocsEntryPoint, ResolvedDocsOptions, ResolvedDocsTestOptions, type ResolvedDocumentComponentImport, ResolvedEditThisPageOptions, ResolvedEmojiShortcodeOptions, ResolvedFeedChannel, ResolvedFeedsOptions, ResolvedFileTreeOptions, ResolvedHeadingPermalinksOptions, ResolvedI18nOptions, ResolvedIconsOptions, ResolvedImageGalleryOptions, ResolvedImageOptions, ResolvedIncludeOptions, ResolvedJsonLd, ResolvedKeyboardKeysOptions, ResolvedMagicLinkOptions, ResolvedMarkdownSourceOptions, ResolvedMathOptions, ResolvedNotByAiOptions, ResolvedNotFoundOptions, ResolvedOgImageOptions, ResolvedOpenApiDocsInput, ResolvedOpenApiDocsOptions, ResolvedOptions, ResolvedPartialsOptions, ResolvedPermalinksOptions, ResolvedPublishStateOptions, ResolvedPwaOptions, ResolvedReaderChrome, ResolvedRedirectsOptions, ResolvedResourcesOptions, ResolvedSanitizeOptions, ResolvedSearchOptions, ResolvedSectionIndexOptions, ResolvedSiteMapsOptions, ResolvedSsgOptions, ResolvedStepsOptions, ResolvedTaxonomiesOptions, ResolvedTeamOptions, type ResolvedThemeConfig, ResolvedTimelineOptions, ResolvedTypedHoverOptions, ResolvedVersionEntry, ResolvedVersionsOptions, ResolvedWikiLinkOptions, ResourcesOptions, ReturnDoc, type RunDocsTestsOptions, SanitizeOptions, ScopedSearchQuery, SearchDocument, SearchOptions, SearchResult, SectionIndexOptions, SectionIndexStyle, type SidebarItem, type SiteConfig, type SiteHead, SiteMapsOptions, type SocialLinks, SsgNavigationGroup, SsgNavigationItem, SsgOptions, SsgOutputPageInput, type SsgOutputPlan, StepsOptions, TaxonomiesOptions, TeamLink, TeamMember, TeamOptions, type ThemeAnnouncement, type ThemeColors, type ThemeComponent, type ThemeConfig, type ThemeEmbed, type ThemeEntryPage, type ThemeFontValue, type ThemeFonts, type ThemeFooter, type ThemeHeader, type ThemeLayout, type ThemeProps, type ThemeRenderOptions, type ThemeTokens, type ThemeWebFont, ThrowsDoc, TimelineOptions, TocEntry, type TransformAllOptions, TransformContext, TransformResult, type TwitterEmbedOptions, type TypecheckCodeBlockOptions, TypedHoverOptions, VersionBannerKind, VersionEntry, VersionsOptions, type VitePressConfig, type VitePressFooter, type VitePressLogo, type VitePressNavItem, type VitePressSidebar, type VitePressSidebarItem, type VitePressSocialLink, type VitePressThemeConfig, WikiLinkOptions, type WriteResourceFilesInput, type WriteResourceFilesPage, type WriteResourceFilesResult, type WrittenDocsTestFile, type YouTubeOptions, applyIslandSsrHtml, buildCollectionManifest, buildSearchIndex, buildSsg, classifyPublishState, clearRenderContext, collectDocsTests, collectGitHubRepos, collectGitHubSources, collectMdxIslandNamesFromHtml, collectMdxJsxNamesFromAst, collectOgpUrls, convertVitePressNav, convertVitePressSidebar, createFrameworkMarkdownOptions, createI18nPlugin, createIncrementalMarkdownParser, createIncrementalMarkdownRenderer, createMarkdownEnvironment, createMarkdownProcessor, createTheme, defaultTheme, defineCollection, defineCollections, defineTheme, discoverDocumentMdxIslands, discoverRegisteredMdxComponents, each, escapeSvelteMarkup, extractCodeBlocks, extractDocs, extractDocsTests, extractIslandInfo, extractVideoId, fetchGitHubSource, fetchOgpData, fetchRepoData, fromVitePressConfig, generateCollectionsVirtualModule, generateFrontmatterTypes, generateHydrationScript, generateMarkdown, generateOgImages, generateOpenApiDocs, generateTabsCSS, generateTypes, generateVirtualModule, generateVitePressMigrationConfig, hasIslands, inferType, intersectHydratableComponentNames, intersectRegisteredComponentNames, isMarkdownFilePath, isMdxFilePath, isRegisteredComponent, jsx, jsxs, lintCodeBlocks, lintMarkdown, lintMarkdownAsync, lintMarkdownFile, lintMarkdownFiles, mergeThemes, mermaidClientScript, normalizeMarkdownExtensions, normalizeVitePressFrontmatter, oxContent, parseGitHubLineRange, parseGitHubPermalink, parsePageChromeFlags, parseRedditPostReference, partitionPublishedPages, planSsgOutputs, prefetchGitHubRepos, prefetchGitHubSources, prefetchOgpData, raw, readingTimeMinutes, renderAllPages, renderHead, renderHtmlToFrameworkCode, renderHtmlToReactComponent, renderHtmlToReactCreateElement, renderHtmlToSvelteComponent, renderHtmlToVueComponent, renderHtmlToVueH, renderIslandComponentImports, renderMarkdown, renderMarkdownStream, renderPage, renderToString, resolveAbbreviationsOptions, resolveBadgeOptions, resolveBlogCollectionName, resolveBlogOptions, resolveBuiltinEmbedOptions, resolveCardOptions, resolveCascadeOptions, resolveCodeGroupOptions, resolveCollectionsOptions, resolveContentRootPath, resolveDataTableOptions, resolveDocsOptions, resolveDocumentComponentImports, resolveFeedsOptions, resolveFileTreeOptions, resolveGitLastmod, resolveHeadValidation, resolveHeaderNavItems, resolveHeadingPermalinksOptions, resolveI18nOptions, resolveImageGalleryOptions, resolveImageOptions, resolveIncludeOptions, resolveKeyboardKeysOptions, resolveLocaleLabel, resolveMarkdownSourceOptions, resolveMathOptions, resolveMdxForFilePath, resolveNotByAiOptions, resolveNotFoundOptions, resolveOgImageOptions, resolvePageChromeOption, resolvePartialsOptions, resolvePermalinksOptions, resolvePublishStateOptions, resolvePwaOptions, resolveRedirectsOptions, resolveResourcesOptions, resolveSearchOptions, resolveSectionIndexOptions, resolveSiteMapsOptions, resolveSsgOptions, resolveStepsOptions, resolveTaxonomiesOptions, resolveTeamOptions, resolveTheme, resolveTimelineOptions, resolveTypedHoverOptions, resolveVersionsOptions, runDocsTests, setRenderContext, shouldLintMarkdownFile, stripMarkdownExtension, stripViteQuery, transformAllPlugins, transformGitHub, transformIslands, transformMarkdown, transformMermaidStatic, transformOgp, transformRedditEmbeds, transformTabs, transformYouTube, typecheckCodeBlocks, useIsActive, useNav, usePageProps, useRenderContext, useSiteConfig, when, writeDocs, writeDocsTestFiles, writeFeedFiles, writeMarkdownCompanions, writeResourceFiles, writeSearchIndex, writeSiteMapFiles };
|
|
4082
7238
|
//# sourceMappingURL=index.d.mts.map
|