@ox-content/vite-plugin 3.0.0-alpha.1 → 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 +14803 -6471
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2273 -186
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2273 -186
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +14843 -6523
- 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 +617 -10
- package/dist/vitepress.cjs.map +1 -1
- package/dist/vitepress.mjs +591 -10
- package/dist/vitepress.mjs.map +1 -1
- package/package.json +24 -4
- 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
|
@@ -48,6 +48,33 @@ interface ResolvedHeaderNavItem {
|
|
|
48
48
|
/** Resolves locale maps so NAPI always receives string labels. */
|
|
49
49
|
declare function resolveHeaderNavItems(items: HeaderNavItem[] | undefined, locale?: string, defaultLocale?: string): ResolvedHeaderNavItem[] | undefined;
|
|
50
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
|
|
51
78
|
//#region src/theme-tokens.d.ts
|
|
52
79
|
/**
|
|
53
80
|
* Free-form `--octc-*` custom properties for themes that need more than the
|
|
@@ -100,12 +127,17 @@ interface ThemeLayout {
|
|
|
100
127
|
}
|
|
101
128
|
/**
|
|
102
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>`.
|
|
103
133
|
*/
|
|
104
134
|
interface ThemeFonts {
|
|
105
|
-
/** Sans-serif font stack */
|
|
106
|
-
sans?:
|
|
107
|
-
/** Monospace font stack */
|
|
108
|
-
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>;
|
|
109
141
|
}
|
|
110
142
|
/**
|
|
111
143
|
* Entry page theme configuration.
|
|
@@ -225,6 +257,14 @@ interface ThemeConfig {
|
|
|
225
257
|
* `breadcrumbs: false` still hides it on that page.
|
|
226
258
|
*/
|
|
227
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";
|
|
228
268
|
/** Light mode colors (maps to CSS variables) */
|
|
229
269
|
colors?: ThemeColors;
|
|
230
270
|
/** Dark mode colors (maps to CSS variables) */
|
|
@@ -279,6 +319,7 @@ interface ResolvedThemeConfig {
|
|
|
279
319
|
viewTransitions: boolean;
|
|
280
320
|
aside: boolean;
|
|
281
321
|
breadcrumbs: boolean;
|
|
322
|
+
headingPermalink: "hover" | "always";
|
|
282
323
|
colors: ThemeColors;
|
|
283
324
|
darkColors: ThemeColors;
|
|
284
325
|
fonts: ThemeFonts;
|
|
@@ -346,6 +387,181 @@ declare function mergeThemes(...themes: (ThemeConfig | ThemeConfig[])[]): ThemeC
|
|
|
346
387
|
*/
|
|
347
388
|
declare function resolveTheme(config?: ThemeConfig | ThemeConfig[]): ResolvedThemeConfig;
|
|
348
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
|
|
349
565
|
//#region src/plugins/github/types.d.ts
|
|
350
566
|
interface GitHubRepoData {
|
|
351
567
|
name: string;
|
|
@@ -371,6 +587,11 @@ interface GitHubSourceRef {
|
|
|
371
587
|
permalink: string;
|
|
372
588
|
lines?: GitHubLineRange;
|
|
373
589
|
}
|
|
590
|
+
interface GitHubSourceCommit {
|
|
591
|
+
sha: string;
|
|
592
|
+
message: string;
|
|
593
|
+
html_url: string;
|
|
594
|
+
}
|
|
374
595
|
interface GitHubSourceData {
|
|
375
596
|
repo: string;
|
|
376
597
|
ref: string;
|
|
@@ -380,6 +601,7 @@ interface GitHubSourceData {
|
|
|
380
601
|
size: number;
|
|
381
602
|
html_url: string;
|
|
382
603
|
language: string | null;
|
|
604
|
+
commit?: GitHubSourceCommit;
|
|
383
605
|
}
|
|
384
606
|
interface GitHubOptions {
|
|
385
607
|
/**
|
|
@@ -447,31 +669,7 @@ declare function parseGitHubPermalink(value: string): GitHubSourceRef | null;
|
|
|
447
669
|
*/
|
|
448
670
|
declare function transformGitHub(html: string, repoDataMap?: Map<string, GitHubRepoData | null>, options?: GitHubOptions): Promise<string>;
|
|
449
671
|
//#endregion
|
|
450
|
-
//#region src/plugins/
|
|
451
|
-
interface TwitterEmbedOptions {
|
|
452
|
-
/** Fetch the post body, author, and media from X at build time. */
|
|
453
|
-
fetch?: boolean;
|
|
454
|
-
/** Language sent to the syndication endpoint. @default "en" */
|
|
455
|
-
lang?: string;
|
|
456
|
-
/** Request timeout in milliseconds. @default 10000 */
|
|
457
|
-
timeout?: number;
|
|
458
|
-
/** Cache syndication responses in memory and on disk. @default true */
|
|
459
|
-
cache?: boolean;
|
|
460
|
-
/** Directory used for the persistent metadata cache. @default ".cache/ox-content/twitter" */
|
|
461
|
-
cacheDir?: string;
|
|
462
|
-
/** Directory where avatars and photos are written. @default "public/ox-content/twitter" */
|
|
463
|
-
mediaOutputDir?: string;
|
|
464
|
-
/** Public URL prefix for downloaded media. @default "/ox-content/twitter" */
|
|
465
|
-
mediaPublicPath?: string;
|
|
466
|
-
}
|
|
467
|
-
//#endregion
|
|
468
|
-
//#region src/plugins/ogp.d.ts
|
|
469
|
-
/**
|
|
470
|
-
* OGP Card Plugin - Link card embedding
|
|
471
|
-
*
|
|
472
|
-
* Transforms <OgCard> components into static link preview cards
|
|
473
|
-
* by fetching OGP metadata at build time.
|
|
474
|
-
*/
|
|
672
|
+
//#region src/plugins/ogp/types.d.ts
|
|
475
673
|
interface OgpData {
|
|
476
674
|
url: string;
|
|
477
675
|
title: string;
|
|
@@ -488,119 +686,45 @@ interface OgpOptions {
|
|
|
488
686
|
timeout?: number;
|
|
489
687
|
/**
|
|
490
688
|
* Cache fetched Open Graph metadata in memory for the current process.
|
|
689
|
+
* Persistent disk cache also requires this to be enabled.
|
|
491
690
|
* @default true
|
|
492
691
|
*/
|
|
493
692
|
cache?: boolean;
|
|
494
693
|
/**
|
|
495
|
-
* Cache TTL in milliseconds.
|
|
694
|
+
* Cache TTL in milliseconds. Fresh memory and disk entries skip the network.
|
|
496
695
|
* @default 3600000
|
|
497
696
|
*/
|
|
498
697
|
cacheTTL?: number;
|
|
499
698
|
/**
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*/
|
|
503
|
-
userAgent?: string;
|
|
504
|
-
}
|
|
505
|
-
/**
|
|
506
|
-
* Fetch OGP data for a URL.
|
|
507
|
-
*/
|
|
508
|
-
declare function fetchOgpData(url: string, options: Required<OgpOptions>): Promise<OgpData | null>;
|
|
509
|
-
/**
|
|
510
|
-
* Collect all OGP URLs from HTML for pre-fetching.
|
|
511
|
-
*/
|
|
512
|
-
declare function collectOgpUrls(html: string): Promise<string[]>;
|
|
513
|
-
/**
|
|
514
|
-
* Pre-fetch all OGP data.
|
|
515
|
-
*/
|
|
516
|
-
declare function prefetchOgpData(urls: string[], options?: OgpOptions): Promise<Map<string, OgpData | null>>;
|
|
517
|
-
/**
|
|
518
|
-
* Transform OgCard components in HTML.
|
|
519
|
-
*/
|
|
520
|
-
declare function transformOgp(html: string, ogpDataMap?: Map<string, OgpData | null>, options?: OgpOptions): Promise<string>;
|
|
521
|
-
//#endregion
|
|
522
|
-
//#region src/plugins/pm.d.ts
|
|
523
|
-
/**
|
|
524
|
-
* Package Manager Tabs Plugin
|
|
525
|
-
*
|
|
526
|
-
* Transforms <pm>npm install …</pm> blocks into a tab group with one tab per
|
|
527
|
-
* package manager (npm/pnpm/yarn/bun). The single npm-style command is converted
|
|
528
|
-
* to each package manager's equivalent natively in Rust (`transformPmEmbeds` in
|
|
529
|
-
* @ox-content/napi), and the result reuses the same `ox-tabs` widget markup as
|
|
530
|
-
* the generic `<tabs>` plugin so styling and keyboard navigation are consistent.
|
|
531
|
-
*
|
|
532
|
-
* Syncing is opt-in (off by default): when enabled, the rendered group carries a
|
|
533
|
-
* `data-ox-tab-group="pkg-manager"` attribute so the client runtime can keep
|
|
534
|
-
* every package-manager group on the page in sync via localStorage.
|
|
535
|
-
*
|
|
536
|
-
* Package-manager groups share the tab-group counter with the `<tabs>` plugin so
|
|
537
|
-
* `data-group` ids (and the CSS produced by `generateTabsCSS`) stay unique.
|
|
538
|
-
*/
|
|
539
|
-
/** Options for {@link transformPm}. */
|
|
540
|
-
interface PmOptions {
|
|
541
|
-
/**
|
|
542
|
-
* Enable opt-in synced package-manager tab groups. When `true`, a
|
|
543
|
-
* `data-ox-tab-group="pkg-manager"` attribute is emitted so the client runtime
|
|
544
|
-
* syncs the active package manager across every pm group on the page and
|
|
545
|
-
* persists the choice in localStorage.
|
|
699
|
+
* Persist successful and negative cache entries to disk across builds.
|
|
700
|
+
* Off by default so existing sites do not write a cache directory.
|
|
546
701
|
* @default false
|
|
547
702
|
*/
|
|
548
|
-
|
|
549
|
-
}
|
|
550
|
-
//#endregion
|
|
551
|
-
//#region src/plugins/tabs.d.ts
|
|
552
|
-
/**
|
|
553
|
-
* Transform Tabs components in HTML.
|
|
554
|
-
*/
|
|
555
|
-
declare function transformTabs(html: string): Promise<string>;
|
|
556
|
-
/**
|
|
557
|
-
* Generate dynamic CSS for :has() based tab switching.
|
|
558
|
-
* This is needed because :has() selectors need unique IDs.
|
|
559
|
-
*/
|
|
560
|
-
declare function generateTabsCSS(groupCount: number): string;
|
|
561
|
-
//#endregion
|
|
562
|
-
//#region src/plugins/youtube.d.ts
|
|
563
|
-
/**
|
|
564
|
-
* YouTube Plugin - Privacy-enhanced iframe embedding
|
|
565
|
-
*
|
|
566
|
-
* Transforms <YouTube> components into responsive iframe embeds using
|
|
567
|
-
* youtube-nocookie.com for enhanced privacy.
|
|
568
|
-
*
|
|
569
|
-
* The HTML rewrite is performed in Rust (`transformYoutubeEmbeds` in
|
|
570
|
-
* @ox-content/napi), replacing the previous rehype parse/stringify
|
|
571
|
-
* round-trip. This module keeps the public TS surface and a cheap marker
|
|
572
|
-
* check so pages without a `<youtube>` element never cross the NAPI boundary.
|
|
573
|
-
*/
|
|
574
|
-
interface YouTubeOptions {
|
|
575
|
-
/**
|
|
576
|
-
* Use privacy-enhanced mode (`youtube-nocookie.com`).
|
|
577
|
-
* @default true
|
|
578
|
-
*/
|
|
579
|
-
privacyEnhanced?: boolean;
|
|
703
|
+
persistCache?: boolean;
|
|
580
704
|
/**
|
|
581
|
-
*
|
|
582
|
-
* @default
|
|
705
|
+
* Directory used for the persistent metadata cache when `persistCache` is on.
|
|
706
|
+
* @default ".cache/ox-content/ogp"
|
|
583
707
|
*/
|
|
584
|
-
|
|
708
|
+
cacheDir?: string;
|
|
585
709
|
/**
|
|
586
|
-
*
|
|
587
|
-
* @default
|
|
710
|
+
* Re-fetch metadata even when a fresh cache entry exists.
|
|
711
|
+
* @default false
|
|
588
712
|
*/
|
|
589
|
-
|
|
713
|
+
refresh?: boolean;
|
|
590
714
|
/**
|
|
591
|
-
*
|
|
592
|
-
* @default
|
|
715
|
+
* User agent sent with metadata fetch requests.
|
|
716
|
+
* @default 'ox-content-ogp-bot/1.0 (compatible; +https://github.com/ubugeeei-prod/ox-content)'
|
|
593
717
|
*/
|
|
594
|
-
|
|
718
|
+
userAgent?: string;
|
|
595
719
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
declare function
|
|
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
|
|
725
|
+
declare function collectOgpUrls(html: string): Promise<string[]>;
|
|
726
|
+
declare function prefetchOgpData(urls: string[], options?: OgpOptions): Promise<Map<string, OgpData | null>>;
|
|
727
|
+
declare function transformOgp(html: string, ogpDataMap?: Map<string, OgpData | null>, options?: OgpOptions): Promise<string>;
|
|
604
728
|
//#endregion
|
|
605
729
|
//#region src/plugins/mermaid.d.ts
|
|
606
730
|
/**
|
|
@@ -647,8 +771,13 @@ interface TransformAllOptions {
|
|
|
647
771
|
mermaid?: boolean;
|
|
648
772
|
githubToken?: string;
|
|
649
773
|
spotify?: boolean;
|
|
774
|
+
appleMusic?: boolean;
|
|
775
|
+
speakerDeck?: boolean;
|
|
776
|
+
audio?: boolean;
|
|
777
|
+
video?: boolean;
|
|
650
778
|
stackBlitz?: boolean;
|
|
651
779
|
twitter?: boolean | TwitterEmbedOptions;
|
|
780
|
+
reddit?: boolean | RedditEmbedOptions;
|
|
652
781
|
bluesky?: boolean;
|
|
653
782
|
webContainer?: boolean;
|
|
654
783
|
}
|
|
@@ -672,10 +801,17 @@ interface BasePageProps {
|
|
|
672
801
|
toc: TocEntry[];
|
|
673
802
|
/** Last git commit timestamp in milliseconds */
|
|
674
803
|
lastUpdated?: number;
|
|
804
|
+
/** Unique git authors for this page */
|
|
805
|
+
contributors?: Array<{
|
|
806
|
+
name: string;
|
|
807
|
+
avatar?: string;
|
|
808
|
+
}>;
|
|
675
809
|
/** Source file path (relative to docs root) */
|
|
676
810
|
path: string;
|
|
677
811
|
/** Output URL path */
|
|
678
812
|
url: string;
|
|
813
|
+
/** Published Markdown companion URL when `ssg.markdownSource` is on */
|
|
814
|
+
markdownSource?: string;
|
|
679
815
|
/** Raw frontmatter object */
|
|
680
816
|
frontmatter: Record<string, unknown>;
|
|
681
817
|
/** Layout name from frontmatter */
|
|
@@ -872,10 +1008,17 @@ interface PageData {
|
|
|
872
1008
|
toc: TocEntry[];
|
|
873
1009
|
/** Last git commit timestamp in milliseconds */
|
|
874
1010
|
lastUpdated?: number;
|
|
1011
|
+
/** Unique git authors for this page */
|
|
1012
|
+
contributors?: Array<{
|
|
1013
|
+
name: string;
|
|
1014
|
+
avatar?: string;
|
|
1015
|
+
}>;
|
|
875
1016
|
/** Source file path */
|
|
876
1017
|
path: string;
|
|
877
1018
|
/** Output URL path */
|
|
878
1019
|
url: string;
|
|
1020
|
+
/** Published Markdown companion URL when `ssg.markdownSource` is on */
|
|
1021
|
+
markdownSource?: string;
|
|
879
1022
|
/** Frontmatter */
|
|
880
1023
|
frontmatter: Record<string, unknown>;
|
|
881
1024
|
/** Layout name */
|
|
@@ -1082,6 +1225,21 @@ interface SsgOptions {
|
|
|
1082
1225
|
* @default '.html'
|
|
1083
1226
|
*/
|
|
1084
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;
|
|
1085
1243
|
/**
|
|
1086
1244
|
* Remove previously generated files from the output directory before writing
|
|
1087
1245
|
* the new SSG result.
|
|
@@ -1187,6 +1345,17 @@ interface SsgOptions {
|
|
|
1187
1345
|
* @default false
|
|
1188
1346
|
*/
|
|
1189
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;
|
|
1190
1359
|
/**
|
|
1191
1360
|
* Show previous/next page links after the article.
|
|
1192
1361
|
*
|
|
@@ -1206,6 +1375,26 @@ interface SsgOptions {
|
|
|
1206
1375
|
* @default false
|
|
1207
1376
|
*/
|
|
1208
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";
|
|
1209
1398
|
/**
|
|
1210
1399
|
* Opt-in copy buttons, outbound-link icons, and a back-to-top control.
|
|
1211
1400
|
*
|
|
@@ -1246,6 +1435,21 @@ interface SsgOptions {
|
|
|
1246
1435
|
* @default false
|
|
1247
1436
|
*/
|
|
1248
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;
|
|
1249
1453
|
/**
|
|
1250
1454
|
* Write a themed 404 page during SSG.
|
|
1251
1455
|
*
|
|
@@ -1267,6 +1471,27 @@ interface SsgOptions {
|
|
|
1267
1471
|
* @default false
|
|
1268
1472
|
*/
|
|
1269
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;
|
|
1270
1495
|
/**
|
|
1271
1496
|
* Absolute site URL used when generating social metadata.
|
|
1272
1497
|
*
|
|
@@ -1362,12 +1587,66 @@ interface A11yOptions {
|
|
|
1362
1587
|
type ResolvedA11y = false | {
|
|
1363
1588
|
skipLinkLabel: string;
|
|
1364
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
|
+
};
|
|
1365
1640
|
/**
|
|
1366
1641
|
* Resolved SSG options.
|
|
1367
1642
|
*/
|
|
1368
1643
|
interface ResolvedSsgOptions {
|
|
1369
1644
|
enabled: boolean;
|
|
1370
1645
|
extension: string;
|
|
1646
|
+
/**
|
|
1647
|
+
* Present after `resolveSsgOptions`. Omitted / empty means off.
|
|
1648
|
+
*/
|
|
1649
|
+
routePrefix?: string;
|
|
1371
1650
|
clean: boolean;
|
|
1372
1651
|
bare: boolean;
|
|
1373
1652
|
render?: ThemeComponent;
|
|
@@ -1379,12 +1658,25 @@ interface ResolvedSsgOptions {
|
|
|
1379
1658
|
ogImage?: string;
|
|
1380
1659
|
generateOgImage: boolean;
|
|
1381
1660
|
lastUpdated: boolean;
|
|
1661
|
+
/**
|
|
1662
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1663
|
+
*/
|
|
1664
|
+
contributors?: ResolvedContributors;
|
|
1382
1665
|
pagination: boolean;
|
|
1383
1666
|
breadcrumbs: boolean;
|
|
1667
|
+
jsonLd: ResolvedJsonLd;
|
|
1668
|
+
/**
|
|
1669
|
+
* Present after `resolveSsgOptions`. Omitted / `false` means off.
|
|
1670
|
+
*/
|
|
1671
|
+
headValidation?: false | "warn" | "strict";
|
|
1384
1672
|
readerChrome: ResolvedReaderChrome;
|
|
1385
1673
|
localeSwitcher: boolean;
|
|
1386
1674
|
a11y: ResolvedA11y;
|
|
1387
1675
|
pageChrome: boolean;
|
|
1676
|
+
/**
|
|
1677
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1678
|
+
*/
|
|
1679
|
+
markdownSource?: ResolvedMarkdownSourceOptions;
|
|
1388
1680
|
/**
|
|
1389
1681
|
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1390
1682
|
*/
|
|
@@ -1393,6 +1685,11 @@ interface ResolvedSsgOptions {
|
|
|
1393
1685
|
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1394
1686
|
*/
|
|
1395
1687
|
team?: ResolvedTeamOptions;
|
|
1688
|
+
/**
|
|
1689
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1690
|
+
*/
|
|
1691
|
+
blog?: ResolvedBlogOptions;
|
|
1692
|
+
sectionIndex?: ResolvedSectionIndexOptions;
|
|
1396
1693
|
siteUrl?: string;
|
|
1397
1694
|
theme?: ResolvedThemeConfig;
|
|
1398
1695
|
navigation?: SsgNavigationGroup[];
|
|
@@ -1445,6 +1742,29 @@ interface TeamMember {
|
|
|
1445
1742
|
/**
|
|
1446
1743
|
* Opt-in team / members page.
|
|
1447
1744
|
*/
|
|
1745
|
+
/**
|
|
1746
|
+
* Opt-in git contributor list.
|
|
1747
|
+
*/
|
|
1748
|
+
interface ContributorsOptions {
|
|
1749
|
+
/**
|
|
1750
|
+
* Author names or emails to omit. Comparison is case-insensitive and
|
|
1751
|
+
* matches the full name or the full email.
|
|
1752
|
+
*/
|
|
1753
|
+
ignore?: string[];
|
|
1754
|
+
/**
|
|
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.
|
|
1758
|
+
*/
|
|
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
|
+
};
|
|
1448
1768
|
interface TeamOptions {
|
|
1449
1769
|
/**
|
|
1450
1770
|
* People rendered as static cards on `layout: team` pages.
|
|
@@ -1459,6 +1779,139 @@ interface ResolvedTeamOptions {
|
|
|
1459
1779
|
enabled: boolean;
|
|
1460
1780
|
members: TeamMember[];
|
|
1461
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 {
|
|
1790
|
+
/**
|
|
1791
|
+
* How children are rendered. `cards` is the default when the feature is on.
|
|
1792
|
+
* @default "cards"
|
|
1793
|
+
*/
|
|
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 {
|
|
1811
|
+
/**
|
|
1812
|
+
* Write `sw.js` and register it from themed pages.
|
|
1813
|
+
* @default true
|
|
1814
|
+
*/
|
|
1815
|
+
offline?: boolean;
|
|
1816
|
+
/**
|
|
1817
|
+
* Manifest `name`. Falls back to `ssg.siteName` when omitted.
|
|
1818
|
+
*/
|
|
1819
|
+
name?: string;
|
|
1820
|
+
/**
|
|
1821
|
+
* Manifest `short_name`. Falls back to `name` when omitted.
|
|
1822
|
+
*/
|
|
1823
|
+
shortName?: string;
|
|
1824
|
+
/**
|
|
1825
|
+
* Manifest / meta theme color. Hex (`#rgb` / `#rrggbb`) or a CSS color name.
|
|
1826
|
+
* @default "#000000"
|
|
1827
|
+
*/
|
|
1828
|
+
themeColor?: string;
|
|
1829
|
+
/**
|
|
1830
|
+
* Manifest background color. Hex or a CSS color name.
|
|
1831
|
+
* @default "#ffffff"
|
|
1832
|
+
*/
|
|
1833
|
+
backgroundColor?: string;
|
|
1834
|
+
/**
|
|
1835
|
+
* Manifest `start_url`. Same-origin site paths only (`/`, `/docs/`).
|
|
1836
|
+
* Defaults to the Vite `base`.
|
|
1837
|
+
*/
|
|
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 {
|
|
1860
|
+
/**
|
|
1861
|
+
* CSS emission mode.
|
|
1862
|
+
* @default "css-mask"
|
|
1863
|
+
*/
|
|
1864
|
+
mode?: "css-mask";
|
|
1865
|
+
/**
|
|
1866
|
+
* Class syntax. `"unocss"` emits `icon-[prefix--name]`.
|
|
1867
|
+
* @default "unocss"
|
|
1868
|
+
*/
|
|
1869
|
+
syntax?: "unocss";
|
|
1870
|
+
/**
|
|
1871
|
+
* Glob patterns to scan, or explicit `prefix:name` icons.
|
|
1872
|
+
* Entries that look like Iconify names are used as-is (no scan).
|
|
1873
|
+
*/
|
|
1874
|
+
include?: string[];
|
|
1875
|
+
/**
|
|
1876
|
+
* Iconify names that are always emitted, even when no source mentions them.
|
|
1877
|
+
*/
|
|
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 {
|
|
1894
|
+
/**
|
|
1895
|
+
* Add `<link rel="alternate" type="text/markdown">` to generated HTML.
|
|
1896
|
+
* @default true
|
|
1897
|
+
*/
|
|
1898
|
+
alternate?: boolean;
|
|
1899
|
+
/**
|
|
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.
|
|
1903
|
+
* @default false
|
|
1904
|
+
*/
|
|
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
|
+
}
|
|
1462
1915
|
/**
|
|
1463
1916
|
* Opt-in crawl manifests written during SSG.
|
|
1464
1917
|
*/
|
|
@@ -1548,6 +2001,13 @@ interface CascadeOptions {
|
|
|
1548
2001
|
interface ResolvedCascadeOptions {
|
|
1549
2002
|
enabled: boolean;
|
|
1550
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";
|
|
1551
2011
|
/**
|
|
1552
2012
|
* Opt-in static redirects, aliases, and path rewrites.
|
|
1553
2013
|
*
|
|
@@ -1562,10 +2022,13 @@ interface RedirectsOptions {
|
|
|
1562
2022
|
*/
|
|
1563
2023
|
map?: Record<string, string>;
|
|
1564
2024
|
/**
|
|
1565
|
-
*
|
|
1566
|
-
*
|
|
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.
|
|
1567
2030
|
*/
|
|
1568
|
-
|
|
2031
|
+
provider?: RedirectProvider;
|
|
1569
2032
|
/**
|
|
1570
2033
|
* Write a `_headers` Location map next to the HTML pages.
|
|
1571
2034
|
* @default false
|
|
@@ -1586,52 +2049,165 @@ interface RedirectsOptions {
|
|
|
1586
2049
|
/**
|
|
1587
2050
|
* Resolved redirect options.
|
|
1588
2051
|
*/
|
|
1589
|
-
interface ResolvedRedirectsOptions {
|
|
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 {
|
|
1590
2133
|
enabled: boolean;
|
|
1591
|
-
|
|
1592
|
-
netlify: boolean;
|
|
1593
|
-
headers: boolean;
|
|
1594
|
-
json: boolean;
|
|
1595
|
-
allowExternal: boolean;
|
|
2134
|
+
feeds?: ResolvedFeedChannel[];
|
|
1596
2135
|
}
|
|
1597
2136
|
/**
|
|
1598
|
-
*
|
|
2137
|
+
* One person in the `blog.authors` map.
|
|
1599
2138
|
*/
|
|
1600
|
-
|
|
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
|
+
}
|
|
1601
2147
|
/**
|
|
1602
|
-
* Opt-in
|
|
2148
|
+
* Opt-in blog index, authors, tags, reading time, and archive.
|
|
1603
2149
|
*/
|
|
1604
|
-
interface
|
|
2150
|
+
interface BlogOptions {
|
|
1605
2151
|
/**
|
|
1606
|
-
*
|
|
1607
|
-
*
|
|
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`.
|
|
1608
2155
|
*/
|
|
1609
|
-
|
|
2156
|
+
collection?: string;
|
|
1610
2157
|
/**
|
|
1611
|
-
*
|
|
1612
|
-
*
|
|
2158
|
+
* Author records keyed by the frontmatter `author` / `authors` value.
|
|
2159
|
+
* @default {}
|
|
1613
2160
|
*/
|
|
1614
|
-
|
|
2161
|
+
authors?: Record<string, BlogAuthor>;
|
|
1615
2162
|
/**
|
|
1616
|
-
*
|
|
1617
|
-
* @default
|
|
2163
|
+
* Posts per index page, newest first.
|
|
2164
|
+
* @default 10
|
|
1618
2165
|
*/
|
|
1619
|
-
|
|
2166
|
+
pageSize?: number;
|
|
1620
2167
|
/**
|
|
1621
|
-
*
|
|
1622
|
-
*
|
|
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 []
|
|
1623
2171
|
*/
|
|
1624
|
-
|
|
2172
|
+
feeds?: Array<string | BlogFeedSource>;
|
|
1625
2173
|
}
|
|
1626
2174
|
/**
|
|
1627
|
-
*
|
|
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.
|
|
1628
2195
|
*/
|
|
1629
|
-
interface
|
|
2196
|
+
interface ResolvedBlogOptions {
|
|
1630
2197
|
enabled: boolean;
|
|
1631
|
-
formats: FeedFormat[];
|
|
1632
2198
|
collection?: string;
|
|
1633
|
-
|
|
1634
|
-
|
|
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;
|
|
1635
2211
|
}
|
|
1636
2212
|
/**
|
|
1637
2213
|
* Opt-in term list pages, per-term pages, and related-page lists.
|
|
@@ -1830,6 +2406,18 @@ interface OxContentOptions {
|
|
|
1830
2406
|
* @default false
|
|
1831
2407
|
*/
|
|
1832
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;
|
|
1833
2421
|
/**
|
|
1834
2422
|
* Write RSS, Atom, and/or JSON Feed files from a named collection.
|
|
1835
2423
|
*
|
|
@@ -1842,6 +2430,29 @@ interface OxContentOptions {
|
|
|
1842
2430
|
* @default false
|
|
1843
2431
|
*/
|
|
1844
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;
|
|
1845
2456
|
/**
|
|
1846
2457
|
* Write tag/category term pages and inject related-page lists.
|
|
1847
2458
|
*
|
|
@@ -1884,6 +2495,17 @@ interface OxContentOptions {
|
|
|
1884
2495
|
* @default true
|
|
1885
2496
|
*/
|
|
1886
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;
|
|
1887
2509
|
/**
|
|
1888
2510
|
* Enable tables.
|
|
1889
2511
|
* @default true
|
|
@@ -1908,9 +2530,9 @@ interface OxContentOptions {
|
|
|
1908
2530
|
* Enable syntax highlighting for code blocks.
|
|
1909
2531
|
*
|
|
1910
2532
|
* When true, fenced and language-tagged inline code is highlighted with the
|
|
1911
|
-
* native tree-sitter engine. Token colors are `--octc-
|
|
1912
|
-
* properties
|
|
1913
|
-
*
|
|
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.
|
|
1914
2536
|
*
|
|
1915
2537
|
* @default false
|
|
1916
2538
|
*/
|
|
@@ -1969,6 +2591,62 @@ interface OxContentOptions {
|
|
|
1969
2591
|
* @default false
|
|
1970
2592
|
*/
|
|
1971
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;
|
|
1972
2650
|
/**
|
|
1973
2651
|
* Opt-in `::: tip` custom containers.
|
|
1974
2652
|
*
|
|
@@ -1989,6 +2667,44 @@ interface OxContentOptions {
|
|
|
1989
2667
|
* @default false
|
|
1990
2668
|
*/
|
|
1991
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;
|
|
1992
2708
|
/**
|
|
1993
2709
|
* Import source snippets into fences with `<<< @/path/to/file.ts{region}`.
|
|
1994
2710
|
*
|
|
@@ -2010,6 +2726,17 @@ interface OxContentOptions {
|
|
|
2010
2726
|
* @default false
|
|
2011
2727
|
*/
|
|
2012
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;
|
|
2013
2740
|
/**
|
|
2014
2741
|
* Opt-in `::: card` / `::: link-card` / `::: card-grid` blocks.
|
|
2015
2742
|
*
|
|
@@ -2028,15 +2755,37 @@ interface OxContentOptions {
|
|
|
2028
2755
|
* @default false
|
|
2029
2756
|
*/
|
|
2030
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;
|
|
2031
2768
|
/**
|
|
2032
2769
|
* Opt-in static directory trees from `file-tree` fences.
|
|
2033
2770
|
*
|
|
2034
2771
|
* Passing `true` or `{}` enables the transform. Names are escaped and never
|
|
2035
|
-
* read from the filesystem.
|
|
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.
|
|
2036
2774
|
*
|
|
2037
2775
|
* @default false
|
|
2038
2776
|
*/
|
|
2039
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;
|
|
2040
2789
|
/**
|
|
2041
2790
|
* Sanitize rendered HTML with safe defaults or explicit allow lists.
|
|
2042
2791
|
*
|
|
@@ -2083,6 +2832,16 @@ interface OxContentOptions {
|
|
|
2083
2832
|
* @default false
|
|
2084
2833
|
*/
|
|
2085
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;
|
|
2086
2845
|
/**
|
|
2087
2846
|
* Extract runnable fenced examples for Vitest docs-as-tests harnesses.
|
|
2088
2847
|
*
|
|
@@ -2121,6 +2880,15 @@ interface OxContentOptions {
|
|
|
2121
2880
|
* @default 3
|
|
2122
2881
|
*/
|
|
2123
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;
|
|
2124
2892
|
/**
|
|
2125
2893
|
* Enable OG image generation.
|
|
2126
2894
|
* @default false
|
|
@@ -2194,12 +2962,23 @@ interface ResolvedOptions {
|
|
|
2194
2962
|
permalinks?: ResolvedPermalinksOptions;
|
|
2195
2963
|
cascade?: ResolvedCascadeOptions;
|
|
2196
2964
|
redirects?: ResolvedRedirectsOptions;
|
|
2965
|
+
blog?: ResolvedBlogOptions;
|
|
2197
2966
|
feeds?: ResolvedFeedsOptions;
|
|
2967
|
+
pwa?: ResolvedPwaOptions;
|
|
2968
|
+
/**
|
|
2969
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
2970
|
+
*/
|
|
2971
|
+
icons?: ResolvedIconsOptions;
|
|
2198
2972
|
taxonomies?: ResolvedTaxonomiesOptions;
|
|
2199
2973
|
versions?: ResolvedVersionsOptions;
|
|
2974
|
+
resources?: ResolvedResourcesOptions;
|
|
2200
2975
|
gfm: boolean;
|
|
2201
2976
|
mdx?: boolean;
|
|
2202
2977
|
footnotes: boolean;
|
|
2978
|
+
/**
|
|
2979
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
2980
|
+
*/
|
|
2981
|
+
semanticFootnotes?: boolean;
|
|
2203
2982
|
tables: boolean;
|
|
2204
2983
|
taskLists: boolean;
|
|
2205
2984
|
strikethrough: boolean;
|
|
@@ -2210,24 +2989,66 @@ interface ResolvedOptions {
|
|
|
2210
2989
|
emojiShortcodes: ResolvedEmojiShortcodeOptions;
|
|
2211
2990
|
attrs: ResolvedAttrsOptions;
|
|
2212
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;
|
|
2213
3009
|
containers: ResolvedContainerOptions;
|
|
2214
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;
|
|
2215
3019
|
codeImports: ResolvedCodeImportOptions;
|
|
2216
3020
|
includes: ResolvedIncludeOptions;
|
|
3021
|
+
/**
|
|
3022
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3023
|
+
*/
|
|
3024
|
+
partials?: ResolvedPartialsOptions;
|
|
2217
3025
|
cards: ResolvedCardOptions;
|
|
2218
3026
|
steps: ResolvedStepsOptions;
|
|
3027
|
+
/**
|
|
3028
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3029
|
+
*/
|
|
3030
|
+
codeGroups?: ResolvedCodeGroupOptions;
|
|
2219
3031
|
fileTree: ResolvedFileTreeOptions;
|
|
3032
|
+
dataTables: ResolvedDataTableOptions;
|
|
2220
3033
|
sanitize: ResolvedSanitizeOptions;
|
|
2221
3034
|
editThisPage: ResolvedEditThisPageOptions;
|
|
2222
3035
|
cjkEmphasis: boolean;
|
|
2223
3036
|
codeBlockLint: ResolvedCodeBlockLintOptions;
|
|
2224
3037
|
codeBlockTypecheck: ResolvedCodeBlockTypecheckOptions;
|
|
3038
|
+
/**
|
|
3039
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3040
|
+
*/
|
|
3041
|
+
typedHover?: ResolvedTypedHoverOptions;
|
|
2225
3042
|
docsTests: ResolvedDocsTestOptions;
|
|
2226
3043
|
mermaid: boolean;
|
|
2227
3044
|
math: ResolvedMathOptions;
|
|
2228
3045
|
frontmatter: boolean;
|
|
2229
3046
|
toc: boolean;
|
|
2230
3047
|
tocMaxDepth: number;
|
|
3048
|
+
/**
|
|
3049
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
3050
|
+
*/
|
|
3051
|
+
headingPermalinks?: ResolvedHeadingPermalinksOptions;
|
|
2231
3052
|
ogImage: boolean;
|
|
2232
3053
|
ogImageOptions: ResolvedOgImageOptions$1;
|
|
2233
3054
|
transformers: MarkdownTransformer[];
|
|
@@ -2269,6 +3090,28 @@ interface BuiltinEmbedOptions {
|
|
|
2269
3090
|
* @default false
|
|
2270
3091
|
*/
|
|
2271
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;
|
|
2272
3115
|
/**
|
|
2273
3116
|
* Render `<StackBlitz url="https://stackblitz.com/edit/...">` iframes.
|
|
2274
3117
|
* @default false
|
|
@@ -2281,6 +3124,12 @@ interface BuiltinEmbedOptions {
|
|
|
2281
3124
|
* @default false
|
|
2282
3125
|
*/
|
|
2283
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;
|
|
2284
3133
|
/**
|
|
2285
3134
|
* Render `<Bluesky>` as static cards.
|
|
2286
3135
|
* @default false
|
|
@@ -2310,27 +3159,195 @@ interface ResolvedBuiltinEmbedOptions {
|
|
|
2310
3159
|
openGraph: OgpOptions | false;
|
|
2311
3160
|
pm: BuiltinPmOptions | false;
|
|
2312
3161
|
spotify: boolean;
|
|
3162
|
+
appleMusic: boolean;
|
|
3163
|
+
speakerDeck: boolean;
|
|
3164
|
+
audio?: boolean;
|
|
3165
|
+
video?: boolean;
|
|
2313
3166
|
stackBlitz: boolean;
|
|
2314
3167
|
twitter: TwitterEmbedOptions | false;
|
|
3168
|
+
reddit?: RedditEmbedOptions | false;
|
|
2315
3169
|
bluesky: boolean;
|
|
2316
3170
|
webContainer: boolean;
|
|
2317
3171
|
}
|
|
2318
3172
|
/**
|
|
2319
|
-
* Options for opt-in `{badge:variant}` inline badges.
|
|
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.
|
|
2320
3298
|
*/
|
|
2321
|
-
interface
|
|
3299
|
+
interface MagicLinkOptions {
|
|
2322
3300
|
/**
|
|
2323
|
-
* Enable the
|
|
3301
|
+
* Enable the magic-link transform when an options object is supplied.
|
|
2324
3302
|
*
|
|
2325
3303
|
* @default true
|
|
2326
3304
|
*/
|
|
2327
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[];
|
|
2328
3325
|
}
|
|
2329
3326
|
/**
|
|
2330
|
-
*
|
|
3327
|
+
* One configured magic-link target.
|
|
2331
3328
|
*/
|
|
2332
|
-
interface
|
|
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 {
|
|
2333
3346
|
enabled: boolean;
|
|
3347
|
+
aliases: Record<string, MagicLinkAlias>;
|
|
3348
|
+
favicon: boolean;
|
|
3349
|
+
faviconTemplate?: string;
|
|
3350
|
+
imageOverrides: MagicLinkImageOverride[];
|
|
2334
3351
|
}
|
|
2335
3352
|
/**
|
|
2336
3353
|
* Options for opt-in `::: type` custom containers.
|
|
@@ -2384,6 +3401,136 @@ interface ResolvedImageOptions {
|
|
|
2384
3401
|
enabled: boolean;
|
|
2385
3402
|
lazy: boolean;
|
|
2386
3403
|
}
|
|
3404
|
+
/**
|
|
3405
|
+
* Options for opt-in static image galleries.
|
|
3406
|
+
*/
|
|
3407
|
+
interface ImageGalleryOptions {
|
|
3408
|
+
/**
|
|
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
|
+
*
|
|
3455
|
+
* @default true
|
|
3456
|
+
*/
|
|
3457
|
+
ordered?: boolean;
|
|
3458
|
+
/**
|
|
3459
|
+
* Diagnostics for malformed `YYYY`, `YYYY-MM`, or `YYYY-MM-DD` item dates.
|
|
3460
|
+
*
|
|
3461
|
+
* @default "error"
|
|
3462
|
+
*/
|
|
3463
|
+
invalidDate?: "error" | "warn" | "ignore";
|
|
3464
|
+
/**
|
|
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
|
+
*
|
|
3520
|
+
* @default false
|
|
3521
|
+
*/
|
|
3522
|
+
dedupe?: boolean;
|
|
3523
|
+
}
|
|
3524
|
+
/**
|
|
3525
|
+
* Resolved page-resource options.
|
|
3526
|
+
*/
|
|
3527
|
+
interface ResolvedResourcesOptions {
|
|
3528
|
+
enabled: boolean;
|
|
3529
|
+
formats: string[];
|
|
3530
|
+
widths: number[];
|
|
3531
|
+
missing: "error" | "warn";
|
|
3532
|
+
dedupe: boolean;
|
|
3533
|
+
}
|
|
2387
3534
|
/**
|
|
2388
3535
|
* Options for expanding Obsidian-style wiki links.
|
|
2389
3536
|
*
|
|
@@ -2440,6 +3587,10 @@ interface ResolvedEmojiShortcodeOptions {
|
|
|
2440
3587
|
}
|
|
2441
3588
|
/**
|
|
2442
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.
|
|
2443
3594
|
*/
|
|
2444
3595
|
interface MathOptions {
|
|
2445
3596
|
/**
|
|
@@ -2479,6 +3630,27 @@ interface AttrsOptions {
|
|
|
2479
3630
|
interface ResolvedAttrsOptions {
|
|
2480
3631
|
enabled: boolean;
|
|
2481
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 {
|
|
3641
|
+
/**
|
|
3642
|
+
* Emit the permalink control.
|
|
3643
|
+
*
|
|
3644
|
+
* @default true
|
|
3645
|
+
*/
|
|
3646
|
+
enabled?: boolean;
|
|
3647
|
+
}
|
|
3648
|
+
/**
|
|
3649
|
+
* Resolved heading permalink options.
|
|
3650
|
+
*/
|
|
3651
|
+
interface ResolvedHeadingPermalinksOptions {
|
|
3652
|
+
enabled: boolean;
|
|
3653
|
+
}
|
|
2482
3654
|
/**
|
|
2483
3655
|
* Options for importing source snippets into code fences.
|
|
2484
3656
|
*
|
|
@@ -2531,6 +3703,48 @@ interface ResolvedIncludeOptions {
|
|
|
2531
3703
|
enabled: boolean;
|
|
2532
3704
|
rootDir?: string;
|
|
2533
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 {
|
|
3714
|
+
/**
|
|
3715
|
+
* Enable the transform when an options object is supplied.
|
|
3716
|
+
*
|
|
3717
|
+
* @default true
|
|
3718
|
+
*/
|
|
3719
|
+
enabled?: boolean;
|
|
3720
|
+
/**
|
|
3721
|
+
* Directory used to resolve `@/` and absolute partial paths.
|
|
3722
|
+
*
|
|
3723
|
+
* @default undefined
|
|
3724
|
+
*/
|
|
3725
|
+
rootDir?: string;
|
|
3726
|
+
/**
|
|
3727
|
+
* Directory used for bare names such as `install.md`.
|
|
3728
|
+
*
|
|
3729
|
+
* @default "_partials"
|
|
3730
|
+
*/
|
|
3731
|
+
root?: string;
|
|
3732
|
+
/**
|
|
3733
|
+
* Missing `{{ name }}` substitutions stay literal, or report a diagnostic.
|
|
3734
|
+
*
|
|
3735
|
+
* @default "literal"
|
|
3736
|
+
*/
|
|
3737
|
+
missing?: "literal" | "error";
|
|
3738
|
+
}
|
|
3739
|
+
/**
|
|
3740
|
+
* Resolved parameterized-partial transform options.
|
|
3741
|
+
*/
|
|
3742
|
+
interface ResolvedPartialsOptions {
|
|
3743
|
+
enabled: boolean;
|
|
3744
|
+
rootDir?: string;
|
|
3745
|
+
root: string;
|
|
3746
|
+
missing: "literal" | "error";
|
|
3747
|
+
}
|
|
2534
3748
|
/**
|
|
2535
3749
|
* Options for opt-in `::: card` / `::: link-card` / `::: card-grid` blocks.
|
|
2536
3750
|
*/
|
|
@@ -2565,6 +3779,37 @@ interface StepsOptions {
|
|
|
2565
3779
|
interface ResolvedStepsOptions {
|
|
2566
3780
|
enabled: boolean;
|
|
2567
3781
|
}
|
|
3782
|
+
/**
|
|
3783
|
+
* Options for opt-in `::: code-group` fence groups.
|
|
3784
|
+
*/
|
|
3785
|
+
interface CodeGroupOptions {
|
|
3786
|
+
/**
|
|
3787
|
+
* Enable the code-group transform when an options object is supplied.
|
|
3788
|
+
*
|
|
3789
|
+
* @default true
|
|
3790
|
+
*/
|
|
3791
|
+
enabled?: boolean;
|
|
3792
|
+
}
|
|
3793
|
+
/**
|
|
3794
|
+
* Resolved code-group transform options.
|
|
3795
|
+
*/
|
|
3796
|
+
interface ResolvedCodeGroupOptions {
|
|
3797
|
+
enabled: boolean;
|
|
3798
|
+
}
|
|
3799
|
+
/**
|
|
3800
|
+
* Replaceable file-tree icons. Values are trusted site-config SVG markup or
|
|
3801
|
+
* CSS class tokens, never fence content.
|
|
3802
|
+
*/
|
|
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
|
+
}
|
|
2568
3813
|
/**
|
|
2569
3814
|
* Options for opt-in `file-tree` fences.
|
|
2570
3815
|
*/
|
|
@@ -2575,12 +3820,63 @@ interface FileTreeOptions {
|
|
|
2575
3820
|
* @default true
|
|
2576
3821
|
*/
|
|
2577
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;
|
|
2578
3835
|
}
|
|
2579
3836
|
/**
|
|
2580
3837
|
* Resolved file-tree transform options.
|
|
2581
3838
|
*/
|
|
2582
3839
|
interface ResolvedFileTreeOptions {
|
|
2583
3840
|
enabled: boolean;
|
|
3841
|
+
defaultOpen: boolean;
|
|
3842
|
+
icons: boolean;
|
|
3843
|
+
iconFolder?: string;
|
|
3844
|
+
iconFolderOpen?: string;
|
|
3845
|
+
iconFile?: string;
|
|
3846
|
+
iconFiles?: Record<string, string>;
|
|
3847
|
+
}
|
|
3848
|
+
/**
|
|
3849
|
+
* Options for opt-in `csv-table` / `json-table` fences.
|
|
3850
|
+
*/
|
|
3851
|
+
interface DataTableOptions {
|
|
3852
|
+
/**
|
|
3853
|
+
* Enable the data-table transform when an options object is supplied.
|
|
3854
|
+
*
|
|
3855
|
+
* @default true
|
|
3856
|
+
*/
|
|
3857
|
+
enabled?: boolean;
|
|
3858
|
+
/**
|
|
3859
|
+
* Directory used to resolve `@/` and absolute import paths.
|
|
3860
|
+
*
|
|
3861
|
+
* When omitted, imports resolve from the Vite project root.
|
|
3862
|
+
*
|
|
3863
|
+
* @default undefined
|
|
3864
|
+
*/
|
|
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";
|
|
3872
|
+
}
|
|
3873
|
+
/**
|
|
3874
|
+
* Resolved data-table transform options.
|
|
3875
|
+
*/
|
|
3876
|
+
interface ResolvedDataTableOptions {
|
|
3877
|
+
enabled: boolean;
|
|
3878
|
+
rootDir?: string;
|
|
3879
|
+
missing: "error" | "warn";
|
|
2584
3880
|
}
|
|
2585
3881
|
/**
|
|
2586
3882
|
* Options for sanitizing rendered HTML.
|
|
@@ -2783,6 +4079,43 @@ interface ResolvedCodeBlockTypecheckOptions {
|
|
|
2783
4079
|
tsgoCommand: string;
|
|
2784
4080
|
mode: "warn" | "error";
|
|
2785
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
|
+
}
|
|
2786
4119
|
/**
|
|
2787
4120
|
* Options for extracting fenced examples into docs-as-tests fixtures.
|
|
2788
4121
|
*
|
|
@@ -2865,11 +4198,67 @@ interface ResolvedCodeAnnotationsOptions {
|
|
|
2865
4198
|
metaKey: string;
|
|
2866
4199
|
defaultLineNumbers: boolean;
|
|
2867
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
|
+
}
|
|
2868
4250
|
/**
|
|
2869
4251
|
* OG image generation options.
|
|
2870
|
-
* Uses Chromium
|
|
4252
|
+
* Uses Chromium or Satori rendering with customizable templates.
|
|
2871
4253
|
*/
|
|
2872
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;
|
|
2873
4262
|
/**
|
|
2874
4263
|
* Path to a custom template file (.ts, .vue, .svelte, .tsx/.jsx).
|
|
2875
4264
|
* - `.ts`: default-export a function `(props) => string`
|
|
@@ -2907,17 +4296,26 @@ interface OgImageOptions {
|
|
|
2907
4296
|
* @default 1
|
|
2908
4297
|
*/
|
|
2909
4298
|
concurrency?: number;
|
|
4299
|
+
/**
|
|
4300
|
+
* Options for the Satori renderer.
|
|
4301
|
+
*/
|
|
4302
|
+
satori?: OgImageSatoriOptions;
|
|
2910
4303
|
}
|
|
2911
4304
|
/**
|
|
2912
4305
|
* Resolved OG image options with all defaults applied.
|
|
2913
4306
|
*/
|
|
2914
4307
|
interface ResolvedOgImageOptions$1 {
|
|
4308
|
+
renderer: OgImageRenderer;
|
|
2915
4309
|
template?: string;
|
|
2916
4310
|
vuePlugin: "vitejs" | "vizejs";
|
|
2917
4311
|
width: number;
|
|
2918
4312
|
height: number;
|
|
2919
4313
|
cache: boolean;
|
|
2920
4314
|
concurrency: number;
|
|
4315
|
+
satori: {
|
|
4316
|
+
fonts: OgImageSatoriFont[];
|
|
4317
|
+
systemFontFallback: boolean;
|
|
4318
|
+
};
|
|
2921
4319
|
}
|
|
2922
4320
|
/**
|
|
2923
4321
|
* Custom AST transformer.
|
|
@@ -2958,6 +4356,30 @@ interface MarkdownNode {
|
|
|
2958
4356
|
value?: string;
|
|
2959
4357
|
[key: string]: unknown;
|
|
2960
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
|
+
}
|
|
2961
4383
|
/**
|
|
2962
4384
|
* Transform result.
|
|
2963
4385
|
*/
|
|
@@ -2973,15 +4395,27 @@ interface TransformResult {
|
|
|
2973
4395
|
/**
|
|
2974
4396
|
* Rendered HTML.
|
|
2975
4397
|
*/
|
|
2976
|
-
html: string;
|
|
4398
|
+
html: string;
|
|
4399
|
+
/**
|
|
4400
|
+
* Parsed frontmatter.
|
|
4401
|
+
*/
|
|
4402
|
+
frontmatter: Record<string, unknown>;
|
|
4403
|
+
/**
|
|
4404
|
+
* Table of contents.
|
|
4405
|
+
*/
|
|
4406
|
+
toc: TocEntry[];
|
|
4407
|
+
/**
|
|
4408
|
+
* MDX `import` statements (empty when MDX is off or no ESM nodes).
|
|
4409
|
+
*/
|
|
4410
|
+
imports: MdxImport[];
|
|
2977
4411
|
/**
|
|
2978
|
-
*
|
|
4412
|
+
* Export names from MDX ESM (empty when MDX is off or no exports).
|
|
2979
4413
|
*/
|
|
2980
|
-
|
|
4414
|
+
exports: string[];
|
|
2981
4415
|
/**
|
|
2982
|
-
*
|
|
4416
|
+
* Unique JSX component names in document order (empty when none).
|
|
2983
4417
|
*/
|
|
2984
|
-
|
|
4418
|
+
components: string[];
|
|
2985
4419
|
}
|
|
2986
4420
|
/**
|
|
2987
4421
|
* Table of contents entry.
|
|
@@ -3086,6 +4520,15 @@ interface DocsOptions {
|
|
|
3086
4520
|
* @default undefined
|
|
3087
4521
|
*/
|
|
3088
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;
|
|
3089
4532
|
/**
|
|
3090
4533
|
* Output format.
|
|
3091
4534
|
*
|
|
@@ -3273,6 +4716,7 @@ interface ResolvedDocsOptions {
|
|
|
3273
4716
|
include: string[];
|
|
3274
4717
|
exclude: string[];
|
|
3275
4718
|
entryPoints?: ResolvedDocsEntryPoint[];
|
|
4719
|
+
openapi: ResolvedOpenApiDocsOptions | false;
|
|
3276
4720
|
format: "markdown" | "json" | "html";
|
|
3277
4721
|
private: boolean;
|
|
3278
4722
|
internal: boolean;
|
|
@@ -3301,6 +4745,48 @@ interface ResolvedDocsOptions {
|
|
|
3301
4745
|
singleEntryRoot: "preserve" | "flatten";
|
|
3302
4746
|
generateNav: boolean;
|
|
3303
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
|
+
}
|
|
3304
4790
|
/**
|
|
3305
4791
|
* A single documentation entry extracted from source.
|
|
3306
4792
|
*
|
|
@@ -3583,6 +5069,16 @@ interface SearchOptions {
|
|
|
3583
5069
|
* @default true
|
|
3584
5070
|
*/
|
|
3585
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;
|
|
3586
5082
|
/**
|
|
3587
5083
|
* Placeholder text for the search input.
|
|
3588
5084
|
*
|
|
@@ -3651,6 +5147,7 @@ interface ResolvedSearchOptions {
|
|
|
3651
5147
|
enabled: boolean;
|
|
3652
5148
|
limit: number;
|
|
3653
5149
|
prefix: boolean;
|
|
5150
|
+
fuzzy: boolean;
|
|
3654
5151
|
placeholder: string;
|
|
3655
5152
|
hotkey: string;
|
|
3656
5153
|
provider?: "local" | "hosted";
|
|
@@ -3804,6 +5301,33 @@ interface ResolvedI18nOptions {
|
|
|
3804
5301
|
check: boolean;
|
|
3805
5302
|
functionNames: string[];
|
|
3806
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
|
+
}
|
|
3807
5331
|
//#endregion
|
|
3808
5332
|
//#region src/virtual.d.ts
|
|
3809
5333
|
declare module "virtual:ox-content/collections" {
|
|
@@ -3839,18 +5363,51 @@ declare module "virtual:ox-content/collections" {
|
|
|
3839
5363
|
export default api;
|
|
3840
5364
|
}
|
|
3841
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
|
|
3842
5378
|
//#region src/card-options.d.ts
|
|
3843
5379
|
declare function resolveCardOptions(options: OxContentOptions["cards"]): ResolvedOptions["cards"];
|
|
3844
5380
|
//#endregion
|
|
3845
5381
|
//#region src/include-options.d.ts
|
|
3846
5382
|
declare function resolveIncludeOptions(options: OxContentOptions["includes"]): ResolvedOptions["includes"];
|
|
3847
5383
|
//#endregion
|
|
5384
|
+
//#region src/partials-options.d.ts
|
|
5385
|
+
declare function resolvePartialsOptions(options: OxContentOptions["partials"]): NonNullable<ResolvedOptions["partials"]>;
|
|
5386
|
+
//#endregion
|
|
3848
5387
|
//#region src/step-options.d.ts
|
|
3849
5388
|
declare function resolveStepsOptions(options: OxContentOptions["steps"]): ResolvedOptions["steps"];
|
|
3850
5389
|
//#endregion
|
|
5390
|
+
//#region src/code-group-options.d.ts
|
|
5391
|
+
declare function resolveCodeGroupOptions(options: OxContentOptions["codeGroups"]): ResolvedCodeGroupOptions;
|
|
5392
|
+
//#endregion
|
|
3851
5393
|
//#region src/file-tree-options.d.ts
|
|
3852
5394
|
declare function resolveFileTreeOptions(options: OxContentOptions["fileTree"]): ResolvedOptions["fileTree"];
|
|
3853
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
|
|
3854
5411
|
//#region src/environment.d.ts
|
|
3855
5412
|
/**
|
|
3856
5413
|
* Creates the Markdown processing environment configuration.
|
|
@@ -4017,6 +5574,9 @@ declare function renderMarkdownStream(chunks: MarkdownChunkSource, options?: Inc
|
|
|
4017
5574
|
* - `html` (string): Rendered HTML content with all enhancements applied
|
|
4018
5575
|
* - `frontmatter` (object): Parsed YAML frontmatter as JavaScript object
|
|
4019
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
|
|
4020
5580
|
* - `render` (function): Client-side render function for dynamic updates
|
|
4021
5581
|
*
|
|
4022
5582
|
* ## Markdown Features Supported
|
|
@@ -4091,6 +5651,155 @@ interface SsgTransformOptions {
|
|
|
4091
5651
|
}
|
|
4092
5652
|
declare function transformMarkdown(source: string, filePath: string, options: ResolvedOptions, ssgOptions?: SsgTransformOptions): Promise<TransformResult>;
|
|
4093
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
|
|
4094
5803
|
//#region src/resolve-image-options.d.ts
|
|
4095
5804
|
declare function resolveImageOptions(options: OxContentOptions["images"]): ResolvedOptions["images"];
|
|
4096
5805
|
//#endregion
|
|
@@ -4118,6 +5827,7 @@ interface FrameworkMarkdownOptions {
|
|
|
4118
5827
|
math?: boolean | {
|
|
4119
5828
|
enabled?: boolean;
|
|
4120
5829
|
};
|
|
5830
|
+
mdx?: boolean;
|
|
4121
5831
|
}
|
|
4122
5832
|
interface FrameworkComponentIsland {
|
|
4123
5833
|
name: string;
|
|
@@ -4399,10 +6109,14 @@ declare function extractDocs(srcDirs: string[], options: ResolvedDocsOptions): P
|
|
|
4399
6109
|
* Generates Markdown documentation from extracted docs.
|
|
4400
6110
|
*/
|
|
4401
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;
|
|
4402
6116
|
/**
|
|
4403
6117
|
* Writes generated documentation to the output directory.
|
|
4404
6118
|
*/
|
|
4405
|
-
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>;
|
|
4406
6120
|
/**
|
|
4407
6121
|
* Resolves docs options with defaults.
|
|
4408
6122
|
*/
|
|
@@ -4727,6 +6441,76 @@ interface SsgBuildResult {
|
|
|
4727
6441
|
*/
|
|
4728
6442
|
declare function buildSsg(options: ResolvedOptions, root: string): Promise<SsgBuildResult>;
|
|
4729
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
|
|
4730
6514
|
//#region src/not-found.d.ts
|
|
4731
6515
|
/**
|
|
4732
6516
|
* Resolves `ssg.notFound` with defaults.
|
|
@@ -4737,6 +6521,26 @@ declare function buildSsg(options: ResolvedOptions, root: string): Promise<SsgBu
|
|
|
4737
6521
|
declare function resolveNotFoundOptions(value: boolean | NotFoundOptions | undefined): ResolvedNotFoundOptions;
|
|
4738
6522
|
//#endregion
|
|
4739
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
|
+
}
|
|
4740
6544
|
/**
|
|
4741
6545
|
* Resolves `siteMaps` with defaults.
|
|
4742
6546
|
*
|
|
@@ -4744,6 +6548,36 @@ declare function resolveNotFoundOptions(value: boolean | NotFoundOptions | undef
|
|
|
4744
6548
|
* enables the feature and overrides only the fields the site set.
|
|
4745
6549
|
*/
|
|
4746
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;
|
|
4747
6581
|
//#endregion
|
|
4748
6582
|
//#region src/publish-state.d.ts
|
|
4749
6583
|
/** Split pages into production output vs listing surfaces. */
|
|
@@ -4780,19 +6614,87 @@ declare function resolveCascadeOptions(value: boolean | CascadeOptions | undefin
|
|
|
4780
6614
|
*
|
|
4781
6615
|
* `false` / omitted stays off. `true` or `{}` enables empty defaults.
|
|
4782
6616
|
* A path map (`{ "/old": "/new" }`) enables the feature with that map.
|
|
4783
|
-
* `{ map,
|
|
6617
|
+
* `{ map, provider, headers, json, allowExternal }` overrides only set fields.
|
|
6618
|
+
* Pass `env` to inject CI detection without reading the real `process.env`.
|
|
4784
6619
|
*/
|
|
4785
|
-
declare function resolveRedirectsOptions(value: boolean | RedirectsOptions | Record<string, string> | undefined): ResolvedRedirectsOptions;
|
|
6620
|
+
declare function resolveRedirectsOptions(value: boolean | RedirectsOptions | Record<string, string> | undefined, env?: NodeJS.ProcessEnv): ResolvedRedirectsOptions;
|
|
4786
6621
|
//#endregion
|
|
4787
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
|
+
}
|
|
4788
6652
|
/**
|
|
4789
6653
|
* Resolves `feeds` with defaults.
|
|
4790
6654
|
*
|
|
4791
6655
|
* `false` / omitted stays off. `true` enables all three formats with
|
|
4792
6656
|
* collection `content` (or the first configured collection) and limit 20.
|
|
4793
|
-
*
|
|
6657
|
+
* A single object is one default feed. A named record or array writes
|
|
6658
|
+
* multiple feeds.
|
|
4794
6659
|
*/
|
|
4795
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;
|
|
4796
6698
|
//#endregion
|
|
4797
6699
|
//#region src/taxonomies.d.ts
|
|
4798
6700
|
/**
|
|
@@ -4810,6 +6712,17 @@ declare function resolveTaxonomiesOptions(value: boolean | TaxonomiesOptions | u
|
|
|
4810
6712
|
*/
|
|
4811
6713
|
declare function resolveVersionsOptions(value: boolean | VersionsOptions | undefined): ResolvedVersionsOptions;
|
|
4812
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
|
|
4813
6726
|
//#region src/team.d.ts
|
|
4814
6727
|
/**
|
|
4815
6728
|
* Resolves `ssg.team` with defaults.
|
|
@@ -4819,6 +6732,15 @@ declare function resolveVersionsOptions(value: boolean | VersionsOptions | undef
|
|
|
4819
6732
|
*/
|
|
4820
6733
|
declare function resolveTeamOptions(value: boolean | TeamOptions | undefined): ResolvedTeamOptions;
|
|
4821
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
|
|
4822
6744
|
//#region src/search.d.ts
|
|
4823
6745
|
/**
|
|
4824
6746
|
* Resolves search options with defaults.
|
|
@@ -4844,12 +6766,6 @@ declare function resolveCollectionsOptions(options: CollectionsOptions | boolean
|
|
|
4844
6766
|
declare function buildCollectionManifest(root: string, options: ResolvedOptions): Promise<CollectionManifest>;
|
|
4845
6767
|
declare function generateCollectionsVirtualModule(root: string, options: ResolvedOptions): Promise<string>;
|
|
4846
6768
|
//#endregion
|
|
4847
|
-
//#region src/markdown.d.ts
|
|
4848
|
-
declare const DEFAULT_MARKDOWN_EXTENSIONS: readonly [".md", ".markdown", ".mdx"];
|
|
4849
|
-
declare function normalizeMarkdownExtensions(extensions?: readonly string[]): string[];
|
|
4850
|
-
declare function isMarkdownFilePath(filePath: string, extensions?: readonly string[]): boolean;
|
|
4851
|
-
declare function stripMarkdownExtension(filePath: string, extensions?: readonly string[]): string;
|
|
4852
|
-
//#endregion
|
|
4853
6769
|
//#region src/vitepress.d.ts
|
|
4854
6770
|
interface VitePressLogo {
|
|
4855
6771
|
light?: string;
|
|
@@ -4982,7 +6898,7 @@ declare function generateHydrationScript(components: string[]): string;
|
|
|
4982
6898
|
//#endregion
|
|
4983
6899
|
//#region src/og-image/types.d.ts
|
|
4984
6900
|
/**
|
|
4985
|
-
* Type definitions for
|
|
6901
|
+
* Type definitions for OG image generation.
|
|
4986
6902
|
*/
|
|
4987
6903
|
/**
|
|
4988
6904
|
* Props passed to OG image template functions.
|
|
@@ -5005,10 +6921,66 @@ interface OgImageTemplateProps {
|
|
|
5005
6921
|
* Template function that receives page metadata and returns an HTML string.
|
|
5006
6922
|
*/
|
|
5007
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
|
+
}
|
|
5008
6973
|
/**
|
|
5009
6974
|
* OG image generation options (user-facing).
|
|
5010
6975
|
*/
|
|
5011
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;
|
|
5012
6984
|
/**
|
|
5013
6985
|
* Path to a custom template file (.ts, .vue, .svelte, .tsx/.jsx).
|
|
5014
6986
|
* - `.ts`: default-export a function `(props) => string`
|
|
@@ -5046,17 +7018,26 @@ interface OgImageOptions$1 {
|
|
|
5046
7018
|
* @default 1
|
|
5047
7019
|
*/
|
|
5048
7020
|
concurrency?: number;
|
|
7021
|
+
/**
|
|
7022
|
+
* Options for the Satori renderer.
|
|
7023
|
+
*/
|
|
7024
|
+
satori?: OgImageSatoriOptions$1;
|
|
5049
7025
|
}
|
|
5050
7026
|
/**
|
|
5051
7027
|
* Resolved OG image options with all defaults applied.
|
|
5052
7028
|
*/
|
|
5053
7029
|
interface ResolvedOgImageOptions {
|
|
7030
|
+
renderer: OgImageRenderer$1;
|
|
5054
7031
|
template?: string;
|
|
5055
7032
|
vuePlugin: "vitejs" | "vizejs";
|
|
5056
7033
|
width: number;
|
|
5057
7034
|
height: number;
|
|
5058
7035
|
cache: boolean;
|
|
5059
7036
|
concurrency: number;
|
|
7037
|
+
satori: {
|
|
7038
|
+
fonts: OgImageSatoriFont$1[];
|
|
7039
|
+
systemFontFallback: boolean;
|
|
7040
|
+
};
|
|
5060
7041
|
}
|
|
5061
7042
|
//#endregion
|
|
5062
7043
|
//#region src/og-image/browser.d.ts
|
|
@@ -5101,7 +7082,7 @@ interface OgImageResult {
|
|
|
5101
7082
|
/**
|
|
5102
7083
|
* Generates OG images for a batch of pages.
|
|
5103
7084
|
*
|
|
5104
|
-
* Manages the full lifecycle: resolve template →
|
|
7085
|
+
* Manages the full lifecycle: resolve template → select renderer →
|
|
5105
7086
|
* render each page (with caching and concurrency).
|
|
5106
7087
|
*
|
|
5107
7088
|
* All errors are non-fatal: failures are reported in results but never throw.
|
|
@@ -5118,6 +7099,115 @@ declare function resolveI18nOptions(options: I18nOptions | false | undefined): R
|
|
|
5118
7099
|
*/
|
|
5119
7100
|
declare function createI18nPlugin(resolvedOptions: ResolvedOptions): Plugin;
|
|
5120
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
|
|
5121
7211
|
//#region src/index.d.ts
|
|
5122
7212
|
/**
|
|
5123
7213
|
* Creates the Ox Content Vite plugin.
|
|
@@ -5139,13 +7229,10 @@ declare function createI18nPlugin(resolvedOptions: ResolvedOptions): Plugin;
|
|
|
5139
7229
|
* ```
|
|
5140
7230
|
*/
|
|
5141
7231
|
declare function oxContent(options?: OxContentOptions): Plugin[];
|
|
5142
|
-
declare function resolveBuiltinEmbedOptions(options: OxContentOptions["embeds"]): ResolvedOptions["embeds"];
|
|
5143
|
-
declare function resolveMathOptions(options: OxContentOptions["math"]): ResolvedOptions["math"];
|
|
5144
|
-
declare function resolveBadgeOptions(options: OxContentOptions["badges"]): ResolvedOptions["badges"];
|
|
5145
7232
|
/**
|
|
5146
7233
|
* Generates virtual module content.
|
|
5147
7234
|
*/
|
|
5148
7235
|
declare function generateVirtualModule(path: string, options: ResolvedOptions): string;
|
|
5149
7236
|
//#endregion
|
|
5150
|
-
export { A11yOptions, AttrsOptions, BadgeOptions, type BasePageProps, BuiltinEmbedOptions, BuiltinPmOptions, CardOptions, CascadeOptions, CodeAnnotationKind, CodeAnnotationSyntax, CodeAnnotationsOptions, type CodeBlockDiagnostic, CodeBlockLintOptions, CodeBlockTypecheckOptions, CodeImportOptions, type CollectedDocsTest, CollectionEntry, CollectionIncludeField, CollectionManifest, CollectionOptions, CollectionQueryBuilder, CollectionQueryOperator, CollectionsOptions, ContainerOptions, ContainerTypeOptions, 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, FeedFormat, FeedsOptions, FileTreeOptions, 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, type HeaderNavItem, HeroAction, HeroConfig, HeroImage, HeroNotice, I18nOptions, 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, type LoadStrategy, LocaleConfig, type LocaleLabel, 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, MathOptions, type MermaidOptions, type NavGroup, NavItem, NotFoundOptions, type OgBrowserSession, OgImageOptions, type OgImagePageEntry, type OgImageOptions$1 as OgImagePluginOptions, type OgImageResult, type OgImageTemplateFn, type OgImageTemplateProps, type OgpData, type OgpOptions, OxContentOptions, type PageChromeFlags, type PageData, type PageProps, ParamDoc, type ParseIslandsResult, PermalinksOptions, PublishStateOptions, ReaderChromeOptions, RedirectsOptions, type RenderContext, ResolvedA11y, ResolvedAttrsOptions, ResolvedBadgeOptions, ResolvedBuiltinEmbedOptions, ResolvedCardOptions, ResolvedCascadeOptions, ResolvedCodeAnnotationsOptions, ResolvedCodeBlockLintOptions, ResolvedCodeBlockTypecheckOptions, ResolvedCodeImportOptions, ResolvedCollectionOptions, ResolvedCollectionsOptions, ResolvedContainerOptions, ResolvedDocsEntryPoint, ResolvedDocsOptions, ResolvedDocsTestOptions, ResolvedEditThisPageOptions, ResolvedEmojiShortcodeOptions, ResolvedFeedsOptions, ResolvedFileTreeOptions, ResolvedI18nOptions, ResolvedImageOptions, ResolvedIncludeOptions, ResolvedMathOptions, ResolvedNotFoundOptions, ResolvedOgImageOptions, ResolvedOptions, ResolvedPermalinksOptions, ResolvedPublishStateOptions, ResolvedReaderChrome, ResolvedRedirectsOptions, ResolvedSanitizeOptions, ResolvedSearchOptions, ResolvedSiteMapsOptions, ResolvedSsgOptions, ResolvedStepsOptions, ResolvedTaxonomiesOptions, ResolvedTeamOptions, type ResolvedThemeConfig, ResolvedVersionEntry, ResolvedVersionsOptions, ResolvedWikiLinkOptions, ReturnDoc, type RunDocsTestsOptions, SanitizeOptions, ScopedSearchQuery, SearchDocument, SearchOptions, SearchResult, type SidebarItem, type SiteConfig, SiteMapsOptions, type SocialLinks, SsgNavigationGroup, SsgNavigationItem, SsgOptions, StepsOptions, TaxonomiesOptions, TeamLink, TeamMember, TeamOptions, type ThemeAnnouncement, type ThemeColors, type ThemeComponent, type ThemeConfig, type ThemeEmbed, type ThemeEntryPage, type ThemeFonts, type ThemeFooter, type ThemeHeader, type ThemeLayout, type ThemeProps, type ThemeRenderOptions, type ThemeTokens, ThrowsDoc, TocEntry, type TransformAllOptions, TransformContext, TransformResult, type TwitterEmbedOptions, type TypecheckCodeBlockOptions, VersionBannerKind, VersionEntry, VersionsOptions, type VitePressConfig, type VitePressFooter, type VitePressLogo, type VitePressNavItem, type VitePressSidebar, type VitePressSidebarItem, type VitePressSocialLink, type VitePressThemeConfig, WikiLinkOptions, type WrittenDocsTestFile, type YouTubeOptions, buildCollectionManifest, buildSearchIndex, buildSsg, classifyPublishState, 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, parsePageChromeFlags, partitionPublishedPages, prefetchGitHubRepos, prefetchGitHubSources, prefetchOgpData, raw, renderAllPages, renderHtmlToFrameworkCode, renderHtmlToReactComponent, renderHtmlToReactCreateElement, renderHtmlToSvelteComponent, renderHtmlToVueComponent, renderHtmlToVueH, renderMarkdownStream, renderPage, renderToString, resolveBadgeOptions, resolveBuiltinEmbedOptions, resolveCardOptions, resolveCascadeOptions, resolveCollectionsOptions, resolveDocsOptions, resolveFeedsOptions, resolveFileTreeOptions, resolveHeaderNavItems, resolveI18nOptions, resolveImageOptions, resolveIncludeOptions, resolveLocaleLabel, resolveMathOptions, resolveNotFoundOptions, resolveOgImageOptions, resolvePageChromeOption, resolvePermalinksOptions, resolvePublishStateOptions, resolveRedirectsOptions, resolveSearchOptions, resolveSiteMapsOptions, resolveSsgOptions, resolveStepsOptions, resolveTaxonomiesOptions, resolveTeamOptions, resolveTheme, resolveVersionsOptions, 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 };
|
|
5151
7238
|
//# sourceMappingURL=index.d.mts.map
|