@ox-content/vite-plugin 2.90.0 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4397 -1784
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1122 -53
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1122 -53
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4382 -1792
- package/dist/index.mjs.map +1 -1
- package/dist/tabs.mjs +1 -1
- package/dist/vitepress.cjs +91 -6
- package/dist/vitepress.cjs.map +1 -1
- package/dist/vitepress.mjs +68 -7
- package/dist/vitepress.mjs.map +1 -1
- package/package.json +6 -7
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,53 @@
|
|
|
1
1
|
import { a as JSXProps, c as jsxs, d as when, i as JSXNode, l as raw, n as JSXChild, o as each, r as JSXElementType, s as jsx, t as Fragment, u as renderToString } from "./jsx-html.cjs";
|
|
2
2
|
import { EnvironmentOptions, Plugin } from "vite";
|
|
3
|
-
|
|
3
|
+
//#region src/header-chrome.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Opt-in header nav, announcement, and per-page chrome helpers.
|
|
6
|
+
*/
|
|
7
|
+
/** Plain label or locale map (`{ en: "Guide", ja: "ガイド" }`). */
|
|
8
|
+
type LocaleLabel = string | Record<string, string>;
|
|
9
|
+
/** Header nav link or dropdown. */
|
|
10
|
+
interface HeaderNavItem {
|
|
11
|
+
text: LocaleLabel;
|
|
12
|
+
link?: string;
|
|
13
|
+
items?: HeaderNavItem[];
|
|
14
|
+
}
|
|
15
|
+
/** Announcement bar. Text is escaped; no raw HTML slot. */
|
|
16
|
+
interface ThemeAnnouncement {
|
|
17
|
+
text: string;
|
|
18
|
+
/** https or same-origin only. */
|
|
19
|
+
link?: string;
|
|
20
|
+
/** Best-effort localStorage key for dismiss. */
|
|
21
|
+
dismissKey?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Per-page frontmatter chrome flags. `false` hides that region. */
|
|
24
|
+
interface PageChromeFlags {
|
|
25
|
+
sidebar?: boolean;
|
|
26
|
+
outline?: boolean;
|
|
27
|
+
aside?: boolean;
|
|
28
|
+
footer?: boolean;
|
|
29
|
+
navbar?: boolean;
|
|
30
|
+
lastUpdated?: boolean;
|
|
31
|
+
editLink?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** `false` or omitted stays off. `true` or `{}` enables default flag reading. */
|
|
34
|
+
declare function resolvePageChromeOption(value: boolean | Record<string, unknown> | undefined): boolean;
|
|
35
|
+
/** Reads hide flags from frontmatter. Non-boolean values are ignored. */
|
|
36
|
+
declare function parsePageChromeFlags(frontmatter: Record<string, unknown>): PageChromeFlags;
|
|
37
|
+
/**
|
|
38
|
+
* Picks the exact locale, its language, the default locale, then the first
|
|
39
|
+
* non-empty own string in declaration order.
|
|
40
|
+
*/
|
|
41
|
+
declare function resolveLocaleLabel(text: LocaleLabel, locale?: string, defaultLocale?: string): string;
|
|
42
|
+
/** Nav item after locale maps are flattened to strings. */
|
|
43
|
+
interface ResolvedHeaderNavItem {
|
|
44
|
+
text: string;
|
|
45
|
+
link?: string;
|
|
46
|
+
items?: ResolvedHeaderNavItem[];
|
|
47
|
+
}
|
|
48
|
+
/** Resolves locale maps so NAPI always receives string labels. */
|
|
49
|
+
declare function resolveHeaderNavItems(items: HeaderNavItem[] | undefined, locale?: string, defaultLocale?: string): ResolvedHeaderNavItem[] | undefined;
|
|
50
|
+
//#endregion
|
|
4
51
|
//#region src/theme-tokens.d.ts
|
|
5
52
|
/**
|
|
6
53
|
* Free-form `--octc-*` custom properties for themes that need more than the
|
|
@@ -137,8 +184,10 @@ interface ThemeEmbed {
|
|
|
137
184
|
/** Custom footer content (replaces default footer) */
|
|
138
185
|
footer?: string;
|
|
139
186
|
}
|
|
187
|
+
/** Sidebar group or link, including recursively nested localized labels. */
|
|
140
188
|
interface SidebarItem {
|
|
141
|
-
|
|
189
|
+
/** Plain label or locale map (`{ en: "Guide", ja: "ガイド" }`). */
|
|
190
|
+
text?: LocaleLabel;
|
|
142
191
|
link?: string;
|
|
143
192
|
items?: SidebarItem[];
|
|
144
193
|
collapsed?: boolean;
|
|
@@ -152,6 +201,30 @@ interface ThemeConfig {
|
|
|
152
201
|
name?: string;
|
|
153
202
|
/** Base theme to extend */
|
|
154
203
|
extends?: ThemeConfig;
|
|
204
|
+
/**
|
|
205
|
+
* Preserve the current surface during same-origin MPA navigation with the
|
|
206
|
+
* browser's cross-document View Transition API.
|
|
207
|
+
*
|
|
208
|
+
* Unsupported browsers use normal navigation. Reduced-motion preferences
|
|
209
|
+
* never enable the transition. Set `false` to opt out.
|
|
210
|
+
*
|
|
211
|
+
* @default true
|
|
212
|
+
*/
|
|
213
|
+
viewTransitions?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Show the right-hand "On this page" outline.
|
|
216
|
+
*
|
|
217
|
+
* Default `false`. When `true`, the outline is rendered only on pages
|
|
218
|
+
* that have TOC entries, using the existing `<aside class="toc">` markup.
|
|
219
|
+
*/
|
|
220
|
+
aside?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Show a breadcrumb trail from the site root through sidebar ancestors.
|
|
223
|
+
*
|
|
224
|
+
* Default `false`. `true` or an object enables the trail. Frontmatter
|
|
225
|
+
* `breadcrumbs: false` still hides it on that page.
|
|
226
|
+
*/
|
|
227
|
+
breadcrumbs?: boolean | Record<string, unknown>;
|
|
155
228
|
/** Light mode colors (maps to CSS variables) */
|
|
156
229
|
colors?: ThemeColors;
|
|
157
230
|
/** Dark mode colors (maps to CSS variables) */
|
|
@@ -164,6 +237,17 @@ interface ThemeConfig {
|
|
|
164
237
|
layout?: ThemeLayout;
|
|
165
238
|
/** Header configuration */
|
|
166
239
|
header?: ThemeHeader;
|
|
240
|
+
/**
|
|
241
|
+
* Opt-in header nav. Each item is `{ text, link }` or a dropdown
|
|
242
|
+
* `{ text, items }`. Labels are escaped. `javascript:`, `data:`,
|
|
243
|
+
* `vbscript:`, and protocol-relative `//` links are omitted.
|
|
244
|
+
*/
|
|
245
|
+
nav?: HeaderNavItem[];
|
|
246
|
+
/**
|
|
247
|
+
* Opt-in announcement bar above the header. Text is escaped.
|
|
248
|
+
* Optional `link` must be https or same-origin.
|
|
249
|
+
*/
|
|
250
|
+
announcement?: ThemeAnnouncement;
|
|
167
251
|
/** Footer configuration */
|
|
168
252
|
footer?: ThemeFooter;
|
|
169
253
|
/** Social links configuration */
|
|
@@ -192,12 +276,17 @@ interface ThemeConfig {
|
|
|
192
276
|
*/
|
|
193
277
|
interface ResolvedThemeConfig {
|
|
194
278
|
name: string;
|
|
279
|
+
viewTransitions: boolean;
|
|
280
|
+
aside: boolean;
|
|
281
|
+
breadcrumbs: boolean;
|
|
195
282
|
colors: ThemeColors;
|
|
196
283
|
darkColors: ThemeColors;
|
|
197
284
|
fonts: ThemeFonts;
|
|
198
285
|
entryPage: ThemeEntryPage;
|
|
199
286
|
layout: ThemeLayout;
|
|
200
287
|
header: ThemeHeader;
|
|
288
|
+
nav?: HeaderNavItem[];
|
|
289
|
+
announcement?: ThemeAnnouncement;
|
|
201
290
|
footer: ThemeFooter;
|
|
202
291
|
socialLinks: SocialLinks;
|
|
203
292
|
sidebar: SidebarItem[];
|
|
@@ -1098,6 +1187,86 @@ interface SsgOptions {
|
|
|
1098
1187
|
* @default false
|
|
1099
1188
|
*/
|
|
1100
1189
|
lastUpdated?: boolean;
|
|
1190
|
+
/**
|
|
1191
|
+
* Show previous/next page links after the article.
|
|
1192
|
+
*
|
|
1193
|
+
* Disabled when omitted or `false`. `true` enables the default pager.
|
|
1194
|
+
* An object also enables the feature.
|
|
1195
|
+
*
|
|
1196
|
+
* @default false
|
|
1197
|
+
*/
|
|
1198
|
+
pagination?: boolean | Record<string, unknown>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Show a breadcrumb trail from the site root through sidebar ancestors.
|
|
1201
|
+
*
|
|
1202
|
+
* Disabled when omitted or `false`. `true` enables the default trail.
|
|
1203
|
+
* An object also enables the feature. Frontmatter `breadcrumbs: false`
|
|
1204
|
+
* hides the trail on that page.
|
|
1205
|
+
*
|
|
1206
|
+
* @default false
|
|
1207
|
+
*/
|
|
1208
|
+
breadcrumbs?: boolean | Record<string, unknown>;
|
|
1209
|
+
/**
|
|
1210
|
+
* Opt-in copy buttons, outbound-link icons, and a back-to-top control.
|
|
1211
|
+
*
|
|
1212
|
+
* Disabled when omitted or `false`. `true` enables all three with defaults.
|
|
1213
|
+
* An object enables the feature and can turn one control off, for example
|
|
1214
|
+
* `{ copy: false }`.
|
|
1215
|
+
*
|
|
1216
|
+
* @default false
|
|
1217
|
+
*/
|
|
1218
|
+
readerChrome?: boolean | ReaderChromeOptions;
|
|
1219
|
+
/**
|
|
1220
|
+
* Show a header locale switcher in the default theme.
|
|
1221
|
+
*
|
|
1222
|
+
* Disabled when omitted or `false`, even if `i18n.locales` is set.
|
|
1223
|
+
* `true` or an object enables the control when available locales are
|
|
1224
|
+
* non-empty. Links use the sibling page when it exists, otherwise the
|
|
1225
|
+
* locale root (`/{locale}/` or a configured root).
|
|
1226
|
+
*
|
|
1227
|
+
* @default false
|
|
1228
|
+
*/
|
|
1229
|
+
localeSwitcher?: boolean | Record<string, unknown>;
|
|
1230
|
+
/**
|
|
1231
|
+
* Opt-in skip link and print styles.
|
|
1232
|
+
*
|
|
1233
|
+
* Disabled when omitted or `false`. `true` enables the default skip link
|
|
1234
|
+
* and print CSS. An object enables the feature and can override the label.
|
|
1235
|
+
*
|
|
1236
|
+
* @default false
|
|
1237
|
+
*/
|
|
1238
|
+
a11y?: boolean | A11yOptions;
|
|
1239
|
+
/**
|
|
1240
|
+
* Honor per-page frontmatter chrome flags (`sidebar`, `outline` / `aside`,
|
|
1241
|
+
* `footer`, `navbar`, `lastUpdated`, `editLink`).
|
|
1242
|
+
*
|
|
1243
|
+
* Disabled when omitted or `false`. `true` or `{}` enables the defaults:
|
|
1244
|
+
* omitted flags keep current chrome, and `false` hides that region.
|
|
1245
|
+
*
|
|
1246
|
+
* @default false
|
|
1247
|
+
*/
|
|
1248
|
+
pageChrome?: boolean | Record<string, unknown>;
|
|
1249
|
+
/**
|
|
1250
|
+
* Write a themed 404 page during SSG.
|
|
1251
|
+
*
|
|
1252
|
+
* Off by default. `true` reads `404.md` from `srcDir` and writes `404.html`.
|
|
1253
|
+
* An object enables the feature and overrides only the fields you set.
|
|
1254
|
+
* When the source file is missing, a built-in "Page not found" page is
|
|
1255
|
+
* written instead. The page is omitted from the search index and sitemap.
|
|
1256
|
+
*
|
|
1257
|
+
* @default false
|
|
1258
|
+
*/
|
|
1259
|
+
notFound?: boolean | NotFoundOptions;
|
|
1260
|
+
/**
|
|
1261
|
+
* Render a static members card grid on pages with `layout: team`.
|
|
1262
|
+
*
|
|
1263
|
+
* Off by default. `true` enables an empty list. An object enables the
|
|
1264
|
+
* feature and supplies `members`. When the option is off, `layout: team`
|
|
1265
|
+
* is ignored and the page stays ordinary.
|
|
1266
|
+
*
|
|
1267
|
+
* @default false
|
|
1268
|
+
*/
|
|
1269
|
+
team?: boolean | TeamOptions;
|
|
1101
1270
|
/**
|
|
1102
1271
|
* Absolute site URL used when generating social metadata.
|
|
1103
1272
|
*
|
|
@@ -1139,6 +1308,60 @@ interface SsgOptions {
|
|
|
1139
1308
|
*/
|
|
1140
1309
|
navigation?: SsgNavigationGroup[];
|
|
1141
1310
|
}
|
|
1311
|
+
/**
|
|
1312
|
+
* Per-control flags for `ssg.readerChrome`.
|
|
1313
|
+
*
|
|
1314
|
+
* Omitted fields stay on when the feature itself is enabled.
|
|
1315
|
+
*/
|
|
1316
|
+
interface ReaderChromeOptions {
|
|
1317
|
+
/**
|
|
1318
|
+
* Copy button on fenced code blocks. The clipboard is read in the browser,
|
|
1319
|
+
* never at build time.
|
|
1320
|
+
*
|
|
1321
|
+
* @default true
|
|
1322
|
+
*/
|
|
1323
|
+
copy?: boolean;
|
|
1324
|
+
/**
|
|
1325
|
+
* Icon and `rel="noopener noreferrer"` on outbound `http(s)` links.
|
|
1326
|
+
* Relative, hash, and same-document links are left alone.
|
|
1327
|
+
*
|
|
1328
|
+
* @default true
|
|
1329
|
+
*/
|
|
1330
|
+
externalLinks?: boolean;
|
|
1331
|
+
/**
|
|
1332
|
+
* Back-to-top control that appears after the page is scrolled.
|
|
1333
|
+
*
|
|
1334
|
+
* @default true
|
|
1335
|
+
*/
|
|
1336
|
+
backToTop?: boolean;
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Resolved reader chrome. `false` means no extra markup or JS.
|
|
1340
|
+
*/
|
|
1341
|
+
type ResolvedReaderChrome = false | {
|
|
1342
|
+
copy: boolean;
|
|
1343
|
+
externalLinks: boolean;
|
|
1344
|
+
backToTop: boolean;
|
|
1345
|
+
};
|
|
1346
|
+
/**
|
|
1347
|
+
* Per-control flags for `ssg.a11y`.
|
|
1348
|
+
*
|
|
1349
|
+
* Omitted fields keep the defaults when the feature itself is enabled.
|
|
1350
|
+
*/
|
|
1351
|
+
interface A11yOptions {
|
|
1352
|
+
/**
|
|
1353
|
+
* Visible label for the skip link. Escaped in HTML.
|
|
1354
|
+
*
|
|
1355
|
+
* @default "Skip to content"
|
|
1356
|
+
*/
|
|
1357
|
+
skipLinkLabel?: string;
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Resolved skip-link / print styles. `false` means no extra markup or CSS.
|
|
1361
|
+
*/
|
|
1362
|
+
type ResolvedA11y = false | {
|
|
1363
|
+
skipLinkLabel: string;
|
|
1364
|
+
};
|
|
1142
1365
|
/**
|
|
1143
1366
|
* Resolved SSG options.
|
|
1144
1367
|
*/
|
|
@@ -1156,10 +1379,342 @@ interface ResolvedSsgOptions {
|
|
|
1156
1379
|
ogImage?: string;
|
|
1157
1380
|
generateOgImage: boolean;
|
|
1158
1381
|
lastUpdated: boolean;
|
|
1382
|
+
pagination: boolean;
|
|
1383
|
+
breadcrumbs: boolean;
|
|
1384
|
+
readerChrome: ResolvedReaderChrome;
|
|
1385
|
+
localeSwitcher: boolean;
|
|
1386
|
+
a11y: ResolvedA11y;
|
|
1387
|
+
pageChrome: boolean;
|
|
1388
|
+
/**
|
|
1389
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1390
|
+
*/
|
|
1391
|
+
notFound?: ResolvedNotFoundOptions;
|
|
1392
|
+
/**
|
|
1393
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1394
|
+
*/
|
|
1395
|
+
team?: ResolvedTeamOptions;
|
|
1159
1396
|
siteUrl?: string;
|
|
1160
1397
|
theme?: ResolvedThemeConfig;
|
|
1161
1398
|
navigation?: SsgNavigationGroup[];
|
|
1162
1399
|
}
|
|
1400
|
+
/**
|
|
1401
|
+
* Opt-in custom 404 page written during SSG.
|
|
1402
|
+
*/
|
|
1403
|
+
interface NotFoundOptions {
|
|
1404
|
+
/**
|
|
1405
|
+
* Markdown source relative to `srcDir`.
|
|
1406
|
+
* @default "404.md"
|
|
1407
|
+
*/
|
|
1408
|
+
source?: string;
|
|
1409
|
+
/**
|
|
1410
|
+
* Output file relative to `outDir`.
|
|
1411
|
+
* @default "404.html"
|
|
1412
|
+
*/
|
|
1413
|
+
output?: string;
|
|
1414
|
+
}
|
|
1415
|
+
/**
|
|
1416
|
+
* Resolved custom 404 options.
|
|
1417
|
+
*/
|
|
1418
|
+
interface ResolvedNotFoundOptions {
|
|
1419
|
+
enabled: boolean;
|
|
1420
|
+
source: string;
|
|
1421
|
+
output: string;
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* One link on a team member card.
|
|
1425
|
+
*/
|
|
1426
|
+
interface TeamLink {
|
|
1427
|
+
/** Visible label. Escaped in HTML. */
|
|
1428
|
+
label: string;
|
|
1429
|
+
/** Destination. Only `https:` or a site-relative `/` path is emitted. */
|
|
1430
|
+
href: string;
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
* One person on the team page.
|
|
1434
|
+
*/
|
|
1435
|
+
interface TeamMember {
|
|
1436
|
+
/** Display name. Escaped in HTML. */
|
|
1437
|
+
name: string;
|
|
1438
|
+
/** Optional role or title. Escaped in HTML. */
|
|
1439
|
+
role?: string;
|
|
1440
|
+
/** Avatar URL. Only `https:` or a site-relative `/` path is emitted. */
|
|
1441
|
+
avatar?: string;
|
|
1442
|
+
/** Optional profile or social links. */
|
|
1443
|
+
links?: TeamLink[];
|
|
1444
|
+
}
|
|
1445
|
+
/**
|
|
1446
|
+
* Opt-in team / members page.
|
|
1447
|
+
*/
|
|
1448
|
+
interface TeamOptions {
|
|
1449
|
+
/**
|
|
1450
|
+
* People rendered as static cards on `layout: team` pages.
|
|
1451
|
+
* @default []
|
|
1452
|
+
*/
|
|
1453
|
+
members?: TeamMember[];
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Resolved team page options.
|
|
1457
|
+
*/
|
|
1458
|
+
interface ResolvedTeamOptions {
|
|
1459
|
+
enabled: boolean;
|
|
1460
|
+
members: TeamMember[];
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Opt-in crawl manifests written during SSG.
|
|
1464
|
+
*/
|
|
1465
|
+
interface SiteMapsOptions {
|
|
1466
|
+
/**
|
|
1467
|
+
* Write `robots.txt` with a Sitemap line.
|
|
1468
|
+
* @default true
|
|
1469
|
+
*/
|
|
1470
|
+
robots?: boolean;
|
|
1471
|
+
/**
|
|
1472
|
+
* Write `llms.txt` with the site title, description, and page URLs.
|
|
1473
|
+
* @default true
|
|
1474
|
+
*/
|
|
1475
|
+
llms?: boolean;
|
|
1476
|
+
}
|
|
1477
|
+
/**
|
|
1478
|
+
* Resolved crawl-manifest options.
|
|
1479
|
+
*/
|
|
1480
|
+
interface ResolvedSiteMapsOptions {
|
|
1481
|
+
enabled: boolean;
|
|
1482
|
+
robots: boolean;
|
|
1483
|
+
llms: boolean;
|
|
1484
|
+
}
|
|
1485
|
+
/**
|
|
1486
|
+
* Opt-in draft / unlisted / scheduled page filtering.
|
|
1487
|
+
*/
|
|
1488
|
+
interface PublishStateOptions {
|
|
1489
|
+
/**
|
|
1490
|
+
* When `false`, frontmatter publish fields are ignored.
|
|
1491
|
+
* @default true when the option is an object
|
|
1492
|
+
*/
|
|
1493
|
+
enabled?: boolean;
|
|
1494
|
+
/**
|
|
1495
|
+
* Injected ISO-8601 clock compared against `scheduled`, `date`, and `expiry`.
|
|
1496
|
+
* Invalid values fall back to the system clock.
|
|
1497
|
+
*/
|
|
1498
|
+
now?: string;
|
|
1499
|
+
/**
|
|
1500
|
+
* Keep draft and not-yet-scheduled pages in output. The dev server sets this.
|
|
1501
|
+
* @default false
|
|
1502
|
+
*/
|
|
1503
|
+
includeDrafts?: boolean;
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Resolved publish-state options.
|
|
1507
|
+
*/
|
|
1508
|
+
interface ResolvedPublishStateOptions {
|
|
1509
|
+
enabled: boolean;
|
|
1510
|
+
now?: string;
|
|
1511
|
+
includeDrafts: boolean;
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Opt-in frontmatter `permalink` / `slug` routing.
|
|
1515
|
+
*
|
|
1516
|
+
* `false` or omitted stays off. `true` or `{}` enables defaults.
|
|
1517
|
+
* Set `enabled: false` on the object to turn the feature back off.
|
|
1518
|
+
*/
|
|
1519
|
+
interface PermalinksOptions {
|
|
1520
|
+
/**
|
|
1521
|
+
* Enable permalink / slug routing.
|
|
1522
|
+
* @default true
|
|
1523
|
+
*/
|
|
1524
|
+
enabled?: boolean;
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Resolved permalink options.
|
|
1528
|
+
*/
|
|
1529
|
+
interface ResolvedPermalinksOptions {
|
|
1530
|
+
enabled: boolean;
|
|
1531
|
+
}
|
|
1532
|
+
/**
|
|
1533
|
+
* Opt-in `_index` directory frontmatter cascade.
|
|
1534
|
+
*
|
|
1535
|
+
* `false` or omitted stays off. `true` or `{}` enables defaults.
|
|
1536
|
+
* Set `enabled: false` on the object to turn the feature back off.
|
|
1537
|
+
*/
|
|
1538
|
+
interface CascadeOptions {
|
|
1539
|
+
/**
|
|
1540
|
+
* Enable directory-level frontmatter inheritance.
|
|
1541
|
+
* @default true
|
|
1542
|
+
*/
|
|
1543
|
+
enabled?: boolean;
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Resolved cascade options.
|
|
1547
|
+
*/
|
|
1548
|
+
interface ResolvedCascadeOptions {
|
|
1549
|
+
enabled: boolean;
|
|
1550
|
+
}
|
|
1551
|
+
/**
|
|
1552
|
+
* Opt-in static redirects, aliases, and path rewrites.
|
|
1553
|
+
*
|
|
1554
|
+
* A path map such as `{ "/old-guide": "/guide" }` is also accepted in place
|
|
1555
|
+
* of this object and enables the feature with that map.
|
|
1556
|
+
*/
|
|
1557
|
+
interface RedirectsOptions {
|
|
1558
|
+
/**
|
|
1559
|
+
* Old path to new path. Destinations must be same-origin (`/` but not `//`)
|
|
1560
|
+
* unless `allowExternal` is set.
|
|
1561
|
+
* @default {}
|
|
1562
|
+
*/
|
|
1563
|
+
map?: Record<string, string>;
|
|
1564
|
+
/**
|
|
1565
|
+
* Write a Netlify / Cloudflare `_redirects` file next to the HTML pages.
|
|
1566
|
+
* @default false
|
|
1567
|
+
*/
|
|
1568
|
+
netlify?: boolean;
|
|
1569
|
+
/**
|
|
1570
|
+
* Write a `_headers` Location map next to the HTML pages.
|
|
1571
|
+
* @default false
|
|
1572
|
+
*/
|
|
1573
|
+
headers?: boolean;
|
|
1574
|
+
/**
|
|
1575
|
+
* Write a machine-readable `redirects.json` map.
|
|
1576
|
+
* @default false
|
|
1577
|
+
*/
|
|
1578
|
+
json?: boolean;
|
|
1579
|
+
/**
|
|
1580
|
+
* Allow `http://` and `https://` destinations. `javascript:`, `data:`, and
|
|
1581
|
+
* protocol-relative `//` targets stay rejected.
|
|
1582
|
+
* @default false
|
|
1583
|
+
*/
|
|
1584
|
+
allowExternal?: boolean;
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* Resolved redirect options.
|
|
1588
|
+
*/
|
|
1589
|
+
interface ResolvedRedirectsOptions {
|
|
1590
|
+
enabled: boolean;
|
|
1591
|
+
map: Record<string, string>;
|
|
1592
|
+
netlify: boolean;
|
|
1593
|
+
headers: boolean;
|
|
1594
|
+
json: boolean;
|
|
1595
|
+
allowExternal: boolean;
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* Feed file formats written during SSG.
|
|
1599
|
+
*/
|
|
1600
|
+
type FeedFormat = "rss" | "atom" | "json";
|
|
1601
|
+
/**
|
|
1602
|
+
* Opt-in RSS / Atom / JSON Feed files written during SSG.
|
|
1603
|
+
*/
|
|
1604
|
+
interface FeedsOptions {
|
|
1605
|
+
/**
|
|
1606
|
+
* Feed formats to write.
|
|
1607
|
+
* @default ["rss", "atom", "json"]
|
|
1608
|
+
*/
|
|
1609
|
+
formats?: FeedFormat[];
|
|
1610
|
+
/**
|
|
1611
|
+
* Named collection to publish. Defaults to `content`, or the first
|
|
1612
|
+
* configured collection when `content` is absent.
|
|
1613
|
+
*/
|
|
1614
|
+
collection?: string;
|
|
1615
|
+
/**
|
|
1616
|
+
* Maximum number of published items, newest first.
|
|
1617
|
+
* @default 20
|
|
1618
|
+
*/
|
|
1619
|
+
limit?: number;
|
|
1620
|
+
/**
|
|
1621
|
+
* Site-relative directory for the generated files.
|
|
1622
|
+
* @default "/"
|
|
1623
|
+
*/
|
|
1624
|
+
path?: string;
|
|
1625
|
+
}
|
|
1626
|
+
/**
|
|
1627
|
+
* Resolved feed options.
|
|
1628
|
+
*/
|
|
1629
|
+
interface ResolvedFeedsOptions {
|
|
1630
|
+
enabled: boolean;
|
|
1631
|
+
formats: FeedFormat[];
|
|
1632
|
+
collection?: string;
|
|
1633
|
+
limit: number;
|
|
1634
|
+
path: string;
|
|
1635
|
+
}
|
|
1636
|
+
/**
|
|
1637
|
+
* Opt-in term list pages, per-term pages, and related-page lists.
|
|
1638
|
+
*/
|
|
1639
|
+
interface TaxonomiesOptions {
|
|
1640
|
+
/**
|
|
1641
|
+
* Frontmatter keys (and URL prefixes) to read terms from.
|
|
1642
|
+
* @default ["tags", "categories"]
|
|
1643
|
+
*/
|
|
1644
|
+
taxonomies?: string[];
|
|
1645
|
+
/**
|
|
1646
|
+
* Maximum related pages injected into a source page.
|
|
1647
|
+
* @default 5
|
|
1648
|
+
*/
|
|
1649
|
+
relatedLimit?: number;
|
|
1650
|
+
}
|
|
1651
|
+
/**
|
|
1652
|
+
* Resolved taxonomy options.
|
|
1653
|
+
*/
|
|
1654
|
+
interface ResolvedTaxonomiesOptions {
|
|
1655
|
+
enabled: boolean;
|
|
1656
|
+
taxonomies: string[];
|
|
1657
|
+
relatedLimit: number;
|
|
1658
|
+
}
|
|
1659
|
+
/** Banner shown on pages that belong to one documented version. */
|
|
1660
|
+
type VersionBannerKind = "unreleased" | "unmaintained";
|
|
1661
|
+
/**
|
|
1662
|
+
* One published or snapshot version of a docs tree.
|
|
1663
|
+
*/
|
|
1664
|
+
interface VersionEntry {
|
|
1665
|
+
/** Stable id used as `versions.current`. */
|
|
1666
|
+
id: string;
|
|
1667
|
+
/** Header label. Escaped before it is rendered. */
|
|
1668
|
+
label: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* URL prefix without slashes (`"2.90"`, `"next"`). Empty string is the
|
|
1671
|
+
* site root.
|
|
1672
|
+
*/
|
|
1673
|
+
prefix: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* Snapshot directory relative to the Vite root. Omitted entries use the
|
|
1676
|
+
* live `srcDir` and are not copied. Historical dirs are read-only.
|
|
1677
|
+
*/
|
|
1678
|
+
dir?: string;
|
|
1679
|
+
/** Optional status banner for pages in this version. */
|
|
1680
|
+
banner?: VersionBannerKind | false;
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* Opt-in documentation versioning.
|
|
1684
|
+
*
|
|
1685
|
+
* Off by default. `true` enables a single current entry. An object enables
|
|
1686
|
+
* the feature and overrides only the fields you set.
|
|
1687
|
+
*/
|
|
1688
|
+
interface VersionsOptions {
|
|
1689
|
+
/** Id of the live tree being built from `srcDir`. */
|
|
1690
|
+
current?: string;
|
|
1691
|
+
/** Render the header version dropdown. @default true */
|
|
1692
|
+
switcher?: boolean;
|
|
1693
|
+
/** Show unreleased / unmaintained badges in the dropdown. @default true */
|
|
1694
|
+
badge?: boolean;
|
|
1695
|
+
/** Declared versions. Historical snapshots must set `dir`. */
|
|
1696
|
+
entries?: VersionEntry[];
|
|
1697
|
+
}
|
|
1698
|
+
/**
|
|
1699
|
+
* Resolved documentation versioning.
|
|
1700
|
+
*/
|
|
1701
|
+
interface ResolvedVersionsOptions {
|
|
1702
|
+
enabled: boolean;
|
|
1703
|
+
current: string;
|
|
1704
|
+
switcher: boolean;
|
|
1705
|
+
badge: boolean;
|
|
1706
|
+
entries: ResolvedVersionEntry[];
|
|
1707
|
+
}
|
|
1708
|
+
/**
|
|
1709
|
+
* One resolved version after prefix and banner sanitization.
|
|
1710
|
+
*/
|
|
1711
|
+
interface ResolvedVersionEntry {
|
|
1712
|
+
id: string;
|
|
1713
|
+
label: string;
|
|
1714
|
+
prefix: string;
|
|
1715
|
+
dir?: string;
|
|
1716
|
+
banner: VersionBannerKind | false;
|
|
1717
|
+
}
|
|
1163
1718
|
/**
|
|
1164
1719
|
* Options for the core `oxContent()` Vite plugin.
|
|
1165
1720
|
*
|
|
@@ -1173,57 +1728,157 @@ interface ResolvedSsgOptions {
|
|
|
1173
1728
|
*/
|
|
1174
1729
|
interface OxContentOptions {
|
|
1175
1730
|
/**
|
|
1176
|
-
* Directory containing Markdown source files.
|
|
1731
|
+
* Directory containing Markdown source files.
|
|
1732
|
+
*
|
|
1733
|
+
* The path is resolved from the Vite project root. SSG, search indexing, and
|
|
1734
|
+
* dev-server routing all use this directory as the content root.
|
|
1735
|
+
*
|
|
1736
|
+
* @default 'content'
|
|
1737
|
+
*/
|
|
1738
|
+
srcDir?: string;
|
|
1739
|
+
/**
|
|
1740
|
+
* Directory where generated files are written.
|
|
1741
|
+
*
|
|
1742
|
+
* SSG HTML, search indexes, and generated assets are emitted under this
|
|
1743
|
+
* directory during production builds.
|
|
1744
|
+
*
|
|
1745
|
+
* @default 'dist'
|
|
1746
|
+
*/
|
|
1747
|
+
outDir?: string;
|
|
1748
|
+
/**
|
|
1749
|
+
* Base path prepended to generated internal URLs.
|
|
1750
|
+
*
|
|
1751
|
+
* Use this when the site is deployed below a sub-path, such as GitHub Pages or
|
|
1752
|
+
* a documentation route inside a larger application.
|
|
1753
|
+
*
|
|
1754
|
+
* @default '/'
|
|
1755
|
+
*/
|
|
1756
|
+
base?: string;
|
|
1757
|
+
/**
|
|
1758
|
+
* Markdown-like file extensions to process.
|
|
1759
|
+
*
|
|
1760
|
+
* Extensions are normalized with a leading dot and matched case-insensitively.
|
|
1761
|
+
* Add custom extensions when another authoring format is compiled to Markdown
|
|
1762
|
+
* before ox-content sees it.
|
|
1763
|
+
*
|
|
1764
|
+
* @default ['.md', '.markdown', '.mdx']
|
|
1765
|
+
*/
|
|
1766
|
+
extensions?: string[];
|
|
1767
|
+
/**
|
|
1768
|
+
* Static Site Generation options.
|
|
1769
|
+
*
|
|
1770
|
+
* Passing `true` or omitting this option enables SSG with defaults. Passing
|
|
1771
|
+
* `false` disables the SSG plugin while still allowing Markdown module
|
|
1772
|
+
* transforms to run.
|
|
1773
|
+
*
|
|
1774
|
+
* @default { enabled: true }
|
|
1775
|
+
*/
|
|
1776
|
+
ssg?: SsgOptions | boolean;
|
|
1777
|
+
/**
|
|
1778
|
+
* Write crawl manifests next to generated HTML.
|
|
1779
|
+
*
|
|
1780
|
+
* Off by default. `true` writes `sitemap.xml`, `robots.txt`, and `llms.txt`.
|
|
1781
|
+
* An object enables the feature and overrides only the fields you set.
|
|
1782
|
+
* Requires `ssg.siteUrl`. When that is missing the build continues and a
|
|
1783
|
+
* warning is emitted instead of writing files.
|
|
1784
|
+
*
|
|
1785
|
+
* @default false
|
|
1786
|
+
*/
|
|
1787
|
+
siteMaps?: boolean | SiteMapsOptions;
|
|
1788
|
+
/**
|
|
1789
|
+
* Honor frontmatter draft / unlisted / scheduled publish states.
|
|
1790
|
+
*
|
|
1791
|
+
* Off by default. `true` omits drafts and future-scheduled pages from
|
|
1792
|
+
* production HTML, search, and sitemaps. Unlisted pages still build and
|
|
1793
|
+
* remain reachable by URL. An object enables the feature and can inject
|
|
1794
|
+
* `now` for a deterministic build-time clock.
|
|
1795
|
+
*
|
|
1796
|
+
* @default false
|
|
1797
|
+
*/
|
|
1798
|
+
publishState?: boolean | PublishStateOptions;
|
|
1799
|
+
/**
|
|
1800
|
+
* Honor frontmatter `permalink` / `slug` when resolving page URLs.
|
|
1801
|
+
*
|
|
1802
|
+
* Off by default. `true` or `{}` replaces the file-tree URL with
|
|
1803
|
+
* `permalink`, or the last path segment with `slug`. Path escape
|
|
1804
|
+
* (`../`, absolute filesystem paths, `javascript:`, protocol-relative
|
|
1805
|
+
* `//`) is rejected and the file-tree URL is kept. Two pages that
|
|
1806
|
+
* resolve to the same URL produce an error; the first page is kept and
|
|
1807
|
+
* the later page is skipped.
|
|
1808
|
+
*
|
|
1809
|
+
* @default false
|
|
1810
|
+
*/
|
|
1811
|
+
permalinks?: boolean | PermalinksOptions;
|
|
1812
|
+
/**
|
|
1813
|
+
* Inherit missing frontmatter keys from ancestor `_index` files.
|
|
1177
1814
|
*
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1815
|
+
* Off by default. `true` or `{}` fills keys a child does not set.
|
|
1816
|
+
* `permalink` and `slug` are never inherited.
|
|
1180
1817
|
*
|
|
1181
|
-
* @default
|
|
1818
|
+
* @default false
|
|
1182
1819
|
*/
|
|
1183
|
-
|
|
1820
|
+
cascade?: boolean | CascadeOptions;
|
|
1184
1821
|
/**
|
|
1185
|
-
*
|
|
1822
|
+
* Write static HTML redirect pages for frontmatter aliases and a config map.
|
|
1186
1823
|
*
|
|
1187
|
-
*
|
|
1188
|
-
*
|
|
1824
|
+
* Off by default. `true` or `{}` enables empty defaults. A path map such as
|
|
1825
|
+
* `{ "/old-guide": "/guide" }` enables the feature with that map. Destinations
|
|
1826
|
+
* must be same-origin paths (`/` but not `//`) unless `allowExternal` is set.
|
|
1827
|
+
* `javascript:`, `data:`, and protocol-relative URLs are ignored.
|
|
1828
|
+
* Overlapping sources last-win after trailing slashes are folded.
|
|
1189
1829
|
*
|
|
1190
|
-
* @default
|
|
1830
|
+
* @default false
|
|
1191
1831
|
*/
|
|
1192
|
-
|
|
1832
|
+
redirects?: boolean | RedirectsOptions | Record<string, string>;
|
|
1193
1833
|
/**
|
|
1194
|
-
*
|
|
1834
|
+
* Write RSS, Atom, and/or JSON Feed files from a named collection.
|
|
1195
1835
|
*
|
|
1196
|
-
*
|
|
1197
|
-
*
|
|
1836
|
+
* Off by default. `true` writes all three formats from the `content`
|
|
1837
|
+
* collection (or the first configured collection) with a 20-item limit.
|
|
1838
|
+
* An object enables the feature and overrides only the fields you set.
|
|
1839
|
+
* Requires `ssg.siteUrl`. When that is missing the build continues and a
|
|
1840
|
+
* warning is emitted instead of writing files.
|
|
1198
1841
|
*
|
|
1199
|
-
* @default
|
|
1842
|
+
* @default false
|
|
1200
1843
|
*/
|
|
1201
|
-
|
|
1844
|
+
feeds?: boolean | FeedsOptions;
|
|
1202
1845
|
/**
|
|
1203
|
-
*
|
|
1846
|
+
* Write tag/category term pages and inject related-page lists.
|
|
1204
1847
|
*
|
|
1205
|
-
*
|
|
1206
|
-
*
|
|
1207
|
-
*
|
|
1848
|
+
* Off by default. `true` reads frontmatter `tags` and `categories` and
|
|
1849
|
+
* writes list pages, per-term pages, and up to 5 related links on pages
|
|
1850
|
+
* that share a term. An object enables the feature and overrides only
|
|
1851
|
+
* the fields you set. Term slugs are `[a-z0-9-]` and every label is
|
|
1852
|
+
* HTML-escaped.
|
|
1208
1853
|
*
|
|
1209
|
-
* @default
|
|
1854
|
+
* @default false
|
|
1210
1855
|
*/
|
|
1211
|
-
|
|
1856
|
+
taxonomies?: boolean | TaxonomiesOptions;
|
|
1212
1857
|
/**
|
|
1213
|
-
*
|
|
1858
|
+
* Prefix live docs, emit frozen snapshot trees, and render a header
|
|
1859
|
+
* version dropdown.
|
|
1214
1860
|
*
|
|
1215
|
-
*
|
|
1216
|
-
*
|
|
1217
|
-
*
|
|
1861
|
+
* Off by default. `true` enables a single current entry. An object
|
|
1862
|
+
* enables the feature and lists additional versions. Historical
|
|
1863
|
+
* snapshot directories are read, never rewritten.
|
|
1218
1864
|
*
|
|
1219
|
-
* @default
|
|
1865
|
+
* @default false
|
|
1220
1866
|
*/
|
|
1221
|
-
|
|
1867
|
+
versions?: boolean | VersionsOptions;
|
|
1222
1868
|
/**
|
|
1223
1869
|
* Enable GitHub Flavored Markdown extensions.
|
|
1224
1870
|
* @default true
|
|
1225
1871
|
*/
|
|
1226
1872
|
gfm?: boolean;
|
|
1873
|
+
/**
|
|
1874
|
+
* Enable MDX JSX, ESM, and expressions.
|
|
1875
|
+
*
|
|
1876
|
+
* When omitted, MDX is enabled for `.mdx` files only. Set `true` to enable
|
|
1877
|
+
* it for every configured extension or `false` to keep `.mdx` on the plain
|
|
1878
|
+
* Markdown path.
|
|
1879
|
+
* @default inferred from the source extension
|
|
1880
|
+
*/
|
|
1881
|
+
mdx?: boolean;
|
|
1227
1882
|
/**
|
|
1228
1883
|
* Enable footnotes.
|
|
1229
1884
|
* @default true
|
|
@@ -1251,28 +1906,15 @@ interface OxContentOptions {
|
|
|
1251
1906
|
autolinks?: boolean;
|
|
1252
1907
|
/**
|
|
1253
1908
|
* Enable syntax highlighting for code blocks.
|
|
1254
|
-
* @default false
|
|
1255
|
-
*/
|
|
1256
|
-
highlight?: boolean;
|
|
1257
|
-
/**
|
|
1258
|
-
* Syntax highlighting theme.
|
|
1259
1909
|
*
|
|
1260
|
-
*
|
|
1261
|
-
*
|
|
1262
|
-
*
|
|
1263
|
-
*
|
|
1264
|
-
* Shiki theme name to opt out and bake fixed colors in instead.
|
|
1910
|
+
* When true, fenced and language-tagged inline code is highlighted with the
|
|
1911
|
+
* native tree-sitter engine. Token colors are `--octc-shiki-*` custom
|
|
1912
|
+
* properties (the `shiki` prefix is historical) so theme-color packages keep
|
|
1913
|
+
* working. Languages with no native grammar stay unhighlighted.
|
|
1265
1914
|
*
|
|
1266
|
-
* @default
|
|
1267
|
-
*/
|
|
1268
|
-
highlightTheme?: string | ThemeRegistration$1;
|
|
1269
|
-
/**
|
|
1270
|
-
* Additional languages for syntax highlighting.
|
|
1271
|
-
* Accepts Shiki LanguageRegistration objects (e.g., TextMate grammars).
|
|
1272
|
-
* These are loaded alongside the built-in languages.
|
|
1273
|
-
* @default []
|
|
1915
|
+
* @default false
|
|
1274
1916
|
*/
|
|
1275
|
-
|
|
1917
|
+
highlight?: boolean;
|
|
1276
1918
|
/**
|
|
1277
1919
|
* Code block line annotations for fenced code blocks.
|
|
1278
1920
|
*
|
|
@@ -1318,6 +1960,35 @@ interface OxContentOptions {
|
|
|
1318
1960
|
* @default false
|
|
1319
1961
|
*/
|
|
1320
1962
|
attrs?: boolean | AttrsOptions;
|
|
1963
|
+
/**
|
|
1964
|
+
* Opt-in `{badge:variant}` inline badges.
|
|
1965
|
+
*
|
|
1966
|
+
* Passing `true` or an options object enables the built-in variants.
|
|
1967
|
+
* Badge text is HTML-escaped. Fenced, indented, and inline code are skipped.
|
|
1968
|
+
*
|
|
1969
|
+
* @default false
|
|
1970
|
+
*/
|
|
1971
|
+
badges?: boolean | BadgeOptions;
|
|
1972
|
+
/**
|
|
1973
|
+
* Opt-in `::: tip` custom containers.
|
|
1974
|
+
*
|
|
1975
|
+
* GitHub-style `> [!NOTE]` callouts stay available without this option.
|
|
1976
|
+
* Passing `true` enables the built-in types. Pass an object to register extra
|
|
1977
|
+
* types or override titles.
|
|
1978
|
+
*
|
|
1979
|
+
* @default false
|
|
1980
|
+
*/
|
|
1981
|
+
containers?: boolean | ContainerOptions;
|
|
1982
|
+
/**
|
|
1983
|
+
* Opt-in figures, captions, and lazy-loaded images.
|
|
1984
|
+
*
|
|
1985
|
+
* Title text becomes a `<figcaption>`. Optional `{width=N height=M}` on the
|
|
1986
|
+
* image is consumed by this feature and does not require `attrs`. Passing
|
|
1987
|
+
* `true` or `{}` enables defaults (`lazy: true`).
|
|
1988
|
+
*
|
|
1989
|
+
* @default false
|
|
1990
|
+
*/
|
|
1991
|
+
images?: boolean | ImageOptions;
|
|
1321
1992
|
/**
|
|
1322
1993
|
* Import source snippets into fences with `<<< @/path/to/file.ts{region}`.
|
|
1323
1994
|
*
|
|
@@ -1328,6 +1999,44 @@ interface OxContentOptions {
|
|
|
1328
1999
|
* @default false
|
|
1329
2000
|
*/
|
|
1330
2001
|
codeImports?: boolean | CodeImportOptions;
|
|
2002
|
+
/**
|
|
2003
|
+
* Inline another Markdown file with `<!-- @include: ./path.md -->`.
|
|
2004
|
+
*
|
|
2005
|
+
* Expansion happens before Markdown is parsed, so included headings and
|
|
2006
|
+
* lists become part of the host document. Relative paths resolve from the
|
|
2007
|
+
* current file. `@/` and `/` resolve from `rootDir`. Paths outside
|
|
2008
|
+
* `rootDir` are rejected and reported as transform errors.
|
|
2009
|
+
*
|
|
2010
|
+
* @default false
|
|
2011
|
+
*/
|
|
2012
|
+
includes?: boolean | IncludeOptions;
|
|
2013
|
+
/**
|
|
2014
|
+
* Opt-in `::: card` / `::: link-card` / `::: card-grid` blocks.
|
|
2015
|
+
*
|
|
2016
|
+
* Passing `true` enables the defaults. Pass an object to keep the option
|
|
2017
|
+
* shape while overriding `enabled`.
|
|
2018
|
+
*
|
|
2019
|
+
* @default false
|
|
2020
|
+
*/
|
|
2021
|
+
cards?: boolean | CardOptions;
|
|
2022
|
+
/**
|
|
2023
|
+
* Restyle a `::: steps` wrapper around an ordered list.
|
|
2024
|
+
*
|
|
2025
|
+
* Disabled when omitted or `false`. `true` and `{}` enable the default
|
|
2026
|
+
* step-list markup. Ordinary ordered lists outside `::: steps` are unchanged.
|
|
2027
|
+
*
|
|
2028
|
+
* @default false
|
|
2029
|
+
*/
|
|
2030
|
+
steps?: boolean | StepsOptions;
|
|
2031
|
+
/**
|
|
2032
|
+
* Opt-in static directory trees from `file-tree` fences.
|
|
2033
|
+
*
|
|
2034
|
+
* Passing `true` or `{}` enables the transform. Names are escaped and never
|
|
2035
|
+
* read from the filesystem.
|
|
2036
|
+
*
|
|
2037
|
+
* @default false
|
|
2038
|
+
*/
|
|
2039
|
+
fileTree?: boolean | FileTreeOptions;
|
|
1331
2040
|
/**
|
|
1332
2041
|
* Sanitize rendered HTML with safe defaults or explicit allow lists.
|
|
1333
2042
|
*
|
|
@@ -1388,6 +2097,15 @@ interface OxContentOptions {
|
|
|
1388
2097
|
* @default false
|
|
1389
2098
|
*/
|
|
1390
2099
|
mermaid?: boolean;
|
|
2100
|
+
/**
|
|
2101
|
+
* Enable `$…$` inline and `$$…$$` block math.
|
|
2102
|
+
*
|
|
2103
|
+
* Currency-like `$` runs, fenced code, indented code, and inline code stay
|
|
2104
|
+
* literal. TeX is HTML-escaped into accessible MathML `mtext`.
|
|
2105
|
+
*
|
|
2106
|
+
* @default false
|
|
2107
|
+
*/
|
|
2108
|
+
math?: boolean | MathOptions;
|
|
1391
2109
|
/**
|
|
1392
2110
|
* Parse YAML frontmatter.
|
|
1393
2111
|
* @default true
|
|
@@ -1471,20 +2189,34 @@ interface ResolvedOptions {
|
|
|
1471
2189
|
base: string;
|
|
1472
2190
|
extensions: string[];
|
|
1473
2191
|
ssg: ResolvedSsgOptions;
|
|
2192
|
+
siteMaps?: ResolvedSiteMapsOptions;
|
|
2193
|
+
publishState?: ResolvedPublishStateOptions;
|
|
2194
|
+
permalinks?: ResolvedPermalinksOptions;
|
|
2195
|
+
cascade?: ResolvedCascadeOptions;
|
|
2196
|
+
redirects?: ResolvedRedirectsOptions;
|
|
2197
|
+
feeds?: ResolvedFeedsOptions;
|
|
2198
|
+
taxonomies?: ResolvedTaxonomiesOptions;
|
|
2199
|
+
versions?: ResolvedVersionsOptions;
|
|
1474
2200
|
gfm: boolean;
|
|
2201
|
+
mdx?: boolean;
|
|
1475
2202
|
footnotes: boolean;
|
|
1476
2203
|
tables: boolean;
|
|
1477
2204
|
taskLists: boolean;
|
|
1478
2205
|
strikethrough: boolean;
|
|
1479
2206
|
autolinks: boolean;
|
|
1480
2207
|
highlight: boolean;
|
|
1481
|
-
highlightTheme: string | ThemeRegistration$1;
|
|
1482
|
-
highlightLangs: LanguageRegistration$1[];
|
|
1483
2208
|
codeAnnotations: ResolvedCodeAnnotationsOptions;
|
|
1484
2209
|
wikiLinks: ResolvedWikiLinkOptions;
|
|
1485
2210
|
emojiShortcodes: ResolvedEmojiShortcodeOptions;
|
|
1486
2211
|
attrs: ResolvedAttrsOptions;
|
|
2212
|
+
badges: ResolvedBadgeOptions;
|
|
2213
|
+
containers: ResolvedContainerOptions;
|
|
2214
|
+
images: ResolvedImageOptions;
|
|
1487
2215
|
codeImports: ResolvedCodeImportOptions;
|
|
2216
|
+
includes: ResolvedIncludeOptions;
|
|
2217
|
+
cards: ResolvedCardOptions;
|
|
2218
|
+
steps: ResolvedStepsOptions;
|
|
2219
|
+
fileTree: ResolvedFileTreeOptions;
|
|
1488
2220
|
sanitize: ResolvedSanitizeOptions;
|
|
1489
2221
|
editThisPage: ResolvedEditThisPageOptions;
|
|
1490
2222
|
cjkEmphasis: boolean;
|
|
@@ -1492,6 +2224,7 @@ interface ResolvedOptions {
|
|
|
1492
2224
|
codeBlockTypecheck: ResolvedCodeBlockTypecheckOptions;
|
|
1493
2225
|
docsTests: ResolvedDocsTestOptions;
|
|
1494
2226
|
mermaid: boolean;
|
|
2227
|
+
math: ResolvedMathOptions;
|
|
1495
2228
|
frontmatter: boolean;
|
|
1496
2229
|
toc: boolean;
|
|
1497
2230
|
tocMaxDepth: number;
|
|
@@ -1582,6 +2315,75 @@ interface ResolvedBuiltinEmbedOptions {
|
|
|
1582
2315
|
bluesky: boolean;
|
|
1583
2316
|
webContainer: boolean;
|
|
1584
2317
|
}
|
|
2318
|
+
/**
|
|
2319
|
+
* Options for opt-in `{badge:variant}` inline badges.
|
|
2320
|
+
*/
|
|
2321
|
+
interface BadgeOptions {
|
|
2322
|
+
/**
|
|
2323
|
+
* Enable the badge transform when an options object is supplied.
|
|
2324
|
+
*
|
|
2325
|
+
* @default true
|
|
2326
|
+
*/
|
|
2327
|
+
enabled?: boolean;
|
|
2328
|
+
}
|
|
2329
|
+
/**
|
|
2330
|
+
* Resolved inline-badge transform options.
|
|
2331
|
+
*/
|
|
2332
|
+
interface ResolvedBadgeOptions {
|
|
2333
|
+
enabled: boolean;
|
|
2334
|
+
}
|
|
2335
|
+
/**
|
|
2336
|
+
* Options for opt-in `::: type` custom containers.
|
|
2337
|
+
*/
|
|
2338
|
+
interface ContainerOptions {
|
|
2339
|
+
/**
|
|
2340
|
+
* Enable the container transform when an options object is supplied.
|
|
2341
|
+
*
|
|
2342
|
+
* @default true
|
|
2343
|
+
*/
|
|
2344
|
+
enabled?: boolean;
|
|
2345
|
+
/**
|
|
2346
|
+
* Extra or overriding container types.
|
|
2347
|
+
*
|
|
2348
|
+
* Keys must be ASCII identifiers (`[A-Za-z0-9_-]+`). Unknown hostile names
|
|
2349
|
+
* are ignored.
|
|
2350
|
+
*/
|
|
2351
|
+
types?: Record<string, ContainerTypeOptions>;
|
|
2352
|
+
}
|
|
2353
|
+
/**
|
|
2354
|
+
* Per-type container presentation.
|
|
2355
|
+
*/
|
|
2356
|
+
interface ContainerTypeOptions {
|
|
2357
|
+
/** Title used when the opener does not set one. */
|
|
2358
|
+
title?: string;
|
|
2359
|
+
/** `"details"` renders `<details>`/`<summary>`; anything else is a `<div>`. */
|
|
2360
|
+
tag?: "div" | "details";
|
|
2361
|
+
}
|
|
2362
|
+
/**
|
|
2363
|
+
* Resolved custom-container transform options.
|
|
2364
|
+
*/
|
|
2365
|
+
interface ResolvedContainerOptions {
|
|
2366
|
+
enabled: boolean;
|
|
2367
|
+
types: Record<string, ContainerTypeOptions>;
|
|
2368
|
+
}
|
|
2369
|
+
/**
|
|
2370
|
+
* Options for opt-in figures, captions, and lazy images.
|
|
2371
|
+
*/
|
|
2372
|
+
interface ImageOptions {
|
|
2373
|
+
/**
|
|
2374
|
+
* Add `loading="lazy"` to transformed images.
|
|
2375
|
+
*
|
|
2376
|
+
* @default true
|
|
2377
|
+
*/
|
|
2378
|
+
lazy?: boolean;
|
|
2379
|
+
}
|
|
2380
|
+
/**
|
|
2381
|
+
* Resolved image transform options.
|
|
2382
|
+
*/
|
|
2383
|
+
interface ResolvedImageOptions {
|
|
2384
|
+
enabled: boolean;
|
|
2385
|
+
lazy: boolean;
|
|
2386
|
+
}
|
|
1585
2387
|
/**
|
|
1586
2388
|
* Options for expanding Obsidian-style wiki links.
|
|
1587
2389
|
*
|
|
@@ -1636,6 +2438,23 @@ interface ResolvedEmojiShortcodeOptions {
|
|
|
1636
2438
|
enabled: boolean;
|
|
1637
2439
|
custom: Record<string, string>;
|
|
1638
2440
|
}
|
|
2441
|
+
/**
|
|
2442
|
+
* Options for opt-in `$…$` / `$$…$$` math.
|
|
2443
|
+
*/
|
|
2444
|
+
interface MathOptions {
|
|
2445
|
+
/**
|
|
2446
|
+
* Enable the math transform when an options object is supplied.
|
|
2447
|
+
*
|
|
2448
|
+
* @default true
|
|
2449
|
+
*/
|
|
2450
|
+
enabled?: boolean;
|
|
2451
|
+
}
|
|
2452
|
+
/**
|
|
2453
|
+
* Resolved math transform options.
|
|
2454
|
+
*/
|
|
2455
|
+
interface ResolvedMathOptions {
|
|
2456
|
+
enabled: boolean;
|
|
2457
|
+
}
|
|
1639
2458
|
/**
|
|
1640
2459
|
* Options for markdown-it-attrs style attribute blocks.
|
|
1641
2460
|
*
|
|
@@ -1689,6 +2508,80 @@ interface ResolvedCodeImportOptions {
|
|
|
1689
2508
|
enabled: boolean;
|
|
1690
2509
|
rootDir?: string;
|
|
1691
2510
|
}
|
|
2511
|
+
/**
|
|
2512
|
+
* Options for inlining Markdown files with `<!-- @include: PATH -->`.
|
|
2513
|
+
*
|
|
2514
|
+
* Relative paths resolve from the current file. `@/` and leading `/` resolve
|
|
2515
|
+
* from `rootDir`. After canonicalize, paths outside `rootDir` are rejected.
|
|
2516
|
+
*/
|
|
2517
|
+
interface IncludeOptions {
|
|
2518
|
+
/**
|
|
2519
|
+
* Directory used to resolve `@/` and absolute include paths.
|
|
2520
|
+
*
|
|
2521
|
+
* When omitted, includes resolve from the Vite project root.
|
|
2522
|
+
*
|
|
2523
|
+
* @default undefined
|
|
2524
|
+
*/
|
|
2525
|
+
rootDir?: string;
|
|
2526
|
+
}
|
|
2527
|
+
/**
|
|
2528
|
+
* Resolved Markdown-include transform options.
|
|
2529
|
+
*/
|
|
2530
|
+
interface ResolvedIncludeOptions {
|
|
2531
|
+
enabled: boolean;
|
|
2532
|
+
rootDir?: string;
|
|
2533
|
+
}
|
|
2534
|
+
/**
|
|
2535
|
+
* Options for opt-in `::: card` / `::: link-card` / `::: card-grid` blocks.
|
|
2536
|
+
*/
|
|
2537
|
+
interface CardOptions {
|
|
2538
|
+
/**
|
|
2539
|
+
* Enable the card transform when an options object is supplied.
|
|
2540
|
+
*
|
|
2541
|
+
* @default true
|
|
2542
|
+
*/
|
|
2543
|
+
enabled?: boolean;
|
|
2544
|
+
}
|
|
2545
|
+
/**
|
|
2546
|
+
* Resolved card transform options.
|
|
2547
|
+
*/
|
|
2548
|
+
interface ResolvedCardOptions {
|
|
2549
|
+
enabled: boolean;
|
|
2550
|
+
}
|
|
2551
|
+
/**
|
|
2552
|
+
* Options for opt-in `::: steps` ordered lists.
|
|
2553
|
+
*/
|
|
2554
|
+
interface StepsOptions {
|
|
2555
|
+
/**
|
|
2556
|
+
* Enable the steps transform when an options object is supplied.
|
|
2557
|
+
*
|
|
2558
|
+
* @default true
|
|
2559
|
+
*/
|
|
2560
|
+
enabled?: boolean;
|
|
2561
|
+
}
|
|
2562
|
+
/**
|
|
2563
|
+
* Resolved step-list transform options.
|
|
2564
|
+
*/
|
|
2565
|
+
interface ResolvedStepsOptions {
|
|
2566
|
+
enabled: boolean;
|
|
2567
|
+
}
|
|
2568
|
+
/**
|
|
2569
|
+
* Options for opt-in `file-tree` fences.
|
|
2570
|
+
*/
|
|
2571
|
+
interface FileTreeOptions {
|
|
2572
|
+
/**
|
|
2573
|
+
* Enable the file-tree transform when an options object is supplied.
|
|
2574
|
+
*
|
|
2575
|
+
* @default true
|
|
2576
|
+
*/
|
|
2577
|
+
enabled?: boolean;
|
|
2578
|
+
}
|
|
2579
|
+
/**
|
|
2580
|
+
* Resolved file-tree transform options.
|
|
2581
|
+
*/
|
|
2582
|
+
interface ResolvedFileTreeOptions {
|
|
2583
|
+
enabled: boolean;
|
|
2584
|
+
}
|
|
1692
2585
|
/**
|
|
1693
2586
|
* Options for sanitizing rendered HTML.
|
|
1694
2587
|
*
|
|
@@ -2706,6 +3599,50 @@ interface SearchOptions {
|
|
|
2706
3599
|
* @default '/'
|
|
2707
3600
|
*/
|
|
2708
3601
|
hotkey?: string;
|
|
3602
|
+
/**
|
|
3603
|
+
* Search backend used by `virtual:ox-content/search`.
|
|
3604
|
+
*
|
|
3605
|
+
* `"local"` (the default) keeps the static BM25 `search-index.json` client.
|
|
3606
|
+
* `"hosted"` sends queries to a remote index with a public search-only key.
|
|
3607
|
+
* Hosted search is used only when this is set to `"hosted"`.
|
|
3608
|
+
*
|
|
3609
|
+
* @default 'local'
|
|
3610
|
+
*/
|
|
3611
|
+
provider?: "local" | "hosted";
|
|
3612
|
+
/**
|
|
3613
|
+
* Hosted search application id.
|
|
3614
|
+
*
|
|
3615
|
+
* Required when `provider` is `"hosted"`. Also read from
|
|
3616
|
+
* `OX_CONTENT_SEARCH_APP_ID` when omitted here.
|
|
3617
|
+
*/
|
|
3618
|
+
appId?: string;
|
|
3619
|
+
/**
|
|
3620
|
+
* Hosted search index name.
|
|
3621
|
+
*
|
|
3622
|
+
* Required when `provider` is `"hosted"`. Also read from
|
|
3623
|
+
* `OX_CONTENT_SEARCH_INDEX_NAME` when omitted here.
|
|
3624
|
+
*/
|
|
3625
|
+
indexName?: string;
|
|
3626
|
+
/**
|
|
3627
|
+
* Public search-only key for the hosted provider.
|
|
3628
|
+
*
|
|
3629
|
+
* Write and admin keys are rejected. Also read from `OX_CONTENT_SEARCH_KEY`
|
|
3630
|
+
* when omitted here.
|
|
3631
|
+
*/
|
|
3632
|
+
searchKey?: string;
|
|
3633
|
+
/**
|
|
3634
|
+
* Alias for `searchKey`.
|
|
3635
|
+
*
|
|
3636
|
+
* Also read from `OX_CONTENT_SEARCH_PUBLIC_KEY` when omitted here.
|
|
3637
|
+
*/
|
|
3638
|
+
publicKey?: string;
|
|
3639
|
+
/**
|
|
3640
|
+
* HTTP endpoint that receives hosted search queries.
|
|
3641
|
+
*
|
|
3642
|
+
* Also read from `OX_CONTENT_SEARCH_ENDPOINT`. Defaults to `/search` when
|
|
3643
|
+
* hosted credentials are present.
|
|
3644
|
+
*/
|
|
3645
|
+
endpoint?: string;
|
|
2709
3646
|
}
|
|
2710
3647
|
/**
|
|
2711
3648
|
* Resolved search options.
|
|
@@ -2716,6 +3653,12 @@ interface ResolvedSearchOptions {
|
|
|
2716
3653
|
prefix: boolean;
|
|
2717
3654
|
placeholder: string;
|
|
2718
3655
|
hotkey: string;
|
|
3656
|
+
provider?: "local" | "hosted";
|
|
3657
|
+
appId?: string;
|
|
3658
|
+
indexName?: string;
|
|
3659
|
+
searchKey?: string;
|
|
3660
|
+
publicKey?: string;
|
|
3661
|
+
endpoint?: string;
|
|
2719
3662
|
}
|
|
2720
3663
|
/**
|
|
2721
3664
|
* Search document structure.
|
|
@@ -2896,6 +3839,18 @@ declare module "virtual:ox-content/collections" {
|
|
|
2896
3839
|
export default api;
|
|
2897
3840
|
}
|
|
2898
3841
|
//#endregion
|
|
3842
|
+
//#region src/card-options.d.ts
|
|
3843
|
+
declare function resolveCardOptions(options: OxContentOptions["cards"]): ResolvedOptions["cards"];
|
|
3844
|
+
//#endregion
|
|
3845
|
+
//#region src/include-options.d.ts
|
|
3846
|
+
declare function resolveIncludeOptions(options: OxContentOptions["includes"]): ResolvedOptions["includes"];
|
|
3847
|
+
//#endregion
|
|
3848
|
+
//#region src/step-options.d.ts
|
|
3849
|
+
declare function resolveStepsOptions(options: OxContentOptions["steps"]): ResolvedOptions["steps"];
|
|
3850
|
+
//#endregion
|
|
3851
|
+
//#region src/file-tree-options.d.ts
|
|
3852
|
+
declare function resolveFileTreeOptions(options: OxContentOptions["fileTree"]): ResolvedOptions["fileTree"];
|
|
3853
|
+
//#endregion
|
|
2899
3854
|
//#region src/environment.d.ts
|
|
2900
3855
|
/**
|
|
2901
3856
|
* Creates the Markdown processing environment configuration.
|
|
@@ -2928,6 +3883,11 @@ interface IncrementalMarkdownParserOptions {
|
|
|
2928
3883
|
* @default true
|
|
2929
3884
|
*/
|
|
2930
3885
|
gfm?: boolean;
|
|
3886
|
+
/**
|
|
3887
|
+
* Enable MDX JSX, ESM, and expression nodes.
|
|
3888
|
+
* @default false
|
|
3889
|
+
*/
|
|
3890
|
+
mdx?: boolean;
|
|
2931
3891
|
/**
|
|
2932
3892
|
* Enable footnotes.
|
|
2933
3893
|
* @default true
|
|
@@ -3104,7 +4064,6 @@ declare function renderMarkdownStream(chunks: MarkdownChunkSource, options?: Inc
|
|
|
3104
4064
|
*
|
|
3105
4065
|
* const options = resolveOptions({
|
|
3106
4066
|
* highlight: true,
|
|
3107
|
-
* highlightTheme: 'github-dark',
|
|
3108
4067
|
* toc: true,
|
|
3109
4068
|
* gfm: true,
|
|
3110
4069
|
* mermaid: true,
|
|
@@ -3132,6 +4091,9 @@ interface SsgTransformOptions {
|
|
|
3132
4091
|
}
|
|
3133
4092
|
declare function transformMarkdown(source: string, filePath: string, options: ResolvedOptions, ssgOptions?: SsgTransformOptions): Promise<TransformResult>;
|
|
3134
4093
|
//#endregion
|
|
4094
|
+
//#region src/resolve-image-options.d.ts
|
|
4095
|
+
declare function resolveImageOptions(options: OxContentOptions["images"]): ResolvedOptions["images"];
|
|
4096
|
+
//#endregion
|
|
3135
4097
|
//#region src/framework.d.ts
|
|
3136
4098
|
type FrameworkRenderTarget = "html" | "native";
|
|
3137
4099
|
type FrameworkCodegenTarget = "react" | "vue" | "svelte";
|
|
@@ -3153,6 +4115,9 @@ interface FrameworkMarkdownOptions {
|
|
|
3153
4115
|
github?: ResolvedOptions["embeds"]["github"];
|
|
3154
4116
|
openGraph?: ResolvedOptions["embeds"]["openGraph"];
|
|
3155
4117
|
};
|
|
4118
|
+
math?: boolean | {
|
|
4119
|
+
enabled?: boolean;
|
|
4120
|
+
};
|
|
3156
4121
|
}
|
|
3157
4122
|
interface FrameworkComponentIsland {
|
|
3158
4123
|
name: string;
|
|
@@ -3579,6 +4544,12 @@ interface MarkdownLintOptions {
|
|
|
3579
4544
|
* @default {}
|
|
3580
4545
|
*/
|
|
3581
4546
|
dictionary?: MarkdownLintDictionaryOptions;
|
|
4547
|
+
/**
|
|
4548
|
+
* Enable MDX-aware syntax masking while linting visible prose.
|
|
4549
|
+
* File-oriented APIs infer this from `.mdx` when omitted.
|
|
4550
|
+
* @default false for content APIs; inferred for file APIs
|
|
4551
|
+
*/
|
|
4552
|
+
mdx?: boolean;
|
|
3582
4553
|
}
|
|
3583
4554
|
/**
|
|
3584
4555
|
* A single Markdown lint diagnostic.
|
|
@@ -3756,6 +4727,98 @@ interface SsgBuildResult {
|
|
|
3756
4727
|
*/
|
|
3757
4728
|
declare function buildSsg(options: ResolvedOptions, root: string): Promise<SsgBuildResult>;
|
|
3758
4729
|
//#endregion
|
|
4730
|
+
//#region src/not-found.d.ts
|
|
4731
|
+
/**
|
|
4732
|
+
* Resolves `ssg.notFound` with defaults.
|
|
4733
|
+
*
|
|
4734
|
+
* `false` / omitted stays off. `true` enables `404.md` → `404.html`. An object
|
|
4735
|
+
* enables the feature and overrides only the fields the site set.
|
|
4736
|
+
*/
|
|
4737
|
+
declare function resolveNotFoundOptions(value: boolean | NotFoundOptions | undefined): ResolvedNotFoundOptions;
|
|
4738
|
+
//#endregion
|
|
4739
|
+
//#region src/site-maps.d.ts
|
|
4740
|
+
/**
|
|
4741
|
+
* Resolves `siteMaps` with defaults.
|
|
4742
|
+
*
|
|
4743
|
+
* `false` / omitted stays off. `true` enables all three files. An object
|
|
4744
|
+
* enables the feature and overrides only the fields the site set.
|
|
4745
|
+
*/
|
|
4746
|
+
declare function resolveSiteMapsOptions(value: boolean | SiteMapsOptions | undefined): ResolvedSiteMapsOptions;
|
|
4747
|
+
//#endregion
|
|
4748
|
+
//#region src/publish-state.d.ts
|
|
4749
|
+
/** Split pages into production output vs listing surfaces. */
|
|
4750
|
+
interface PartitionedPages<T> {
|
|
4751
|
+
output: T[];
|
|
4752
|
+
listed: T[];
|
|
4753
|
+
}
|
|
4754
|
+
/**
|
|
4755
|
+
* Resolves `publishState` with defaults.
|
|
4756
|
+
*
|
|
4757
|
+
* `false` / omitted stays off. `true` enables production filtering. An object
|
|
4758
|
+
* enables the feature and overrides only the fields the site set.
|
|
4759
|
+
*/
|
|
4760
|
+
declare function resolvePublishStateOptions(value: boolean | PublishStateOptions | undefined): ResolvedPublishStateOptions;
|
|
4761
|
+
/** Classifies one frontmatter object. Never throws. */
|
|
4762
|
+
declare function classifyPublishState(frontmatter: Record<string, unknown>, options: ResolvedPublishStateOptions | undefined): {
|
|
4763
|
+
output: boolean;
|
|
4764
|
+
listed: boolean;
|
|
4765
|
+
};
|
|
4766
|
+
/** Splits pages into those that write HTML and those that appear in listings. */
|
|
4767
|
+
declare function partitionPublishedPages<T extends {
|
|
4768
|
+
frontmatter: Record<string, unknown>;
|
|
4769
|
+
}>(pages: readonly T[], options: ResolvedPublishStateOptions | undefined): PartitionedPages<T>;
|
|
4770
|
+
//#endregion
|
|
4771
|
+
//#region src/permalinks.d.ts
|
|
4772
|
+
/** Resolves `permalinks`. `false` / omitted stays off. `true` / `{}` enables. */
|
|
4773
|
+
declare function resolvePermalinksOptions(value: boolean | PermalinksOptions | undefined): ResolvedPermalinksOptions;
|
|
4774
|
+
/** Resolves `cascade`. `false` / omitted stays off. `true` / `{}` enables. */
|
|
4775
|
+
declare function resolveCascadeOptions(value: boolean | CascadeOptions | undefined): ResolvedCascadeOptions;
|
|
4776
|
+
//#endregion
|
|
4777
|
+
//#region src/redirects.d.ts
|
|
4778
|
+
/**
|
|
4779
|
+
* Resolves `redirects` with defaults.
|
|
4780
|
+
*
|
|
4781
|
+
* `false` / omitted stays off. `true` or `{}` enables empty defaults.
|
|
4782
|
+
* A path map (`{ "/old": "/new" }`) enables the feature with that map.
|
|
4783
|
+
* `{ map, netlify, headers, json, allowExternal }` overrides only set fields.
|
|
4784
|
+
*/
|
|
4785
|
+
declare function resolveRedirectsOptions(value: boolean | RedirectsOptions | Record<string, string> | undefined): ResolvedRedirectsOptions;
|
|
4786
|
+
//#endregion
|
|
4787
|
+
//#region src/feeds.d.ts
|
|
4788
|
+
/**
|
|
4789
|
+
* Resolves `feeds` with defaults.
|
|
4790
|
+
*
|
|
4791
|
+
* `false` / omitted stays off. `true` enables all three formats with
|
|
4792
|
+
* collection `content` (or the first configured collection) and limit 20.
|
|
4793
|
+
* An object enables the feature and overrides only the fields the site set.
|
|
4794
|
+
*/
|
|
4795
|
+
declare function resolveFeedsOptions(value: boolean | FeedsOptions | undefined): ResolvedFeedsOptions;
|
|
4796
|
+
//#endregion
|
|
4797
|
+
//#region src/taxonomies.d.ts
|
|
4798
|
+
/**
|
|
4799
|
+
* Resolves `taxonomies` with defaults.
|
|
4800
|
+
*
|
|
4801
|
+
* `false` / omitted stays off. `true` enables `tags` and `categories` with
|
|
4802
|
+
* relatedLimit 5. An object enables the feature and overrides only set fields.
|
|
4803
|
+
*/
|
|
4804
|
+
declare function resolveTaxonomiesOptions(value: boolean | TaxonomiesOptions | undefined): ResolvedTaxonomiesOptions;
|
|
4805
|
+
//#endregion
|
|
4806
|
+
//#region src/versions.d.ts
|
|
4807
|
+
/**
|
|
4808
|
+
* Resolves `versions`. Omitted / `false` stay off. `true` enables a single
|
|
4809
|
+
* current entry. An object enables the feature and overrides set fields.
|
|
4810
|
+
*/
|
|
4811
|
+
declare function resolveVersionsOptions(value: boolean | VersionsOptions | undefined): ResolvedVersionsOptions;
|
|
4812
|
+
//#endregion
|
|
4813
|
+
//#region src/team.d.ts
|
|
4814
|
+
/**
|
|
4815
|
+
* Resolves `ssg.team` with defaults.
|
|
4816
|
+
*
|
|
4817
|
+
* `false` / omitted stays off. `true` enables an empty member list.
|
|
4818
|
+
* An object enables the feature and keeps the members the site set.
|
|
4819
|
+
*/
|
|
4820
|
+
declare function resolveTeamOptions(value: boolean | TeamOptions | undefined): ResolvedTeamOptions;
|
|
4821
|
+
//#endregion
|
|
3759
4822
|
//#region src/search.d.ts
|
|
3760
4823
|
/**
|
|
3761
4824
|
* Resolves search options with defaults.
|
|
@@ -3763,8 +4826,12 @@ declare function buildSsg(options: ResolvedOptions, root: string): Promise<SsgBu
|
|
|
3763
4826
|
declare function resolveSearchOptions(options: SearchOptions | boolean | undefined): ResolvedSearchOptions;
|
|
3764
4827
|
/**
|
|
3765
4828
|
* Builds the search index from Markdown files.
|
|
4829
|
+
*
|
|
4830
|
+
* `publishState` is forwarded to the native indexer. `excludeDocumentIds`
|
|
4831
|
+
* then drops matching documents and rebuilds the BM25 index so omitted
|
|
4832
|
+
* pages (such as the opt-in 404 source) are not searchable.
|
|
3766
4833
|
*/
|
|
3767
|
-
declare function buildSearchIndex(srcDir: string, base: string, extensions?: readonly string[]): Promise<string>;
|
|
4834
|
+
declare function buildSearchIndex(srcDir: string, base: string, extensions?: readonly string[], publishState?: ResolvedPublishStateOptions, excludeDocumentIds?: readonly string[], mdx?: boolean): Promise<string>;
|
|
3768
4835
|
/**
|
|
3769
4836
|
* Writes the search index to a file.
|
|
3770
4837
|
*/
|
|
@@ -4073,10 +5140,12 @@ declare function createI18nPlugin(resolvedOptions: ResolvedOptions): Plugin;
|
|
|
4073
5140
|
*/
|
|
4074
5141
|
declare function oxContent(options?: OxContentOptions): Plugin[];
|
|
4075
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"];
|
|
4076
5145
|
/**
|
|
4077
5146
|
* Generates virtual module content.
|
|
4078
5147
|
*/
|
|
4079
5148
|
declare function generateVirtualModule(path: string, options: ResolvedOptions): string;
|
|
4080
5149
|
//#endregion
|
|
4081
|
-
export { AttrsOptions, type BasePageProps, BuiltinEmbedOptions, BuiltinPmOptions, CodeAnnotationKind, CodeAnnotationSyntax, CodeAnnotationsOptions, type CodeBlockDiagnostic, CodeBlockLintOptions, CodeBlockTypecheckOptions, CodeImportOptions, type CollectedDocsTest, CollectionEntry, CollectionIncludeField, CollectionManifest, CollectionOptions, CollectionQueryBuilder, CollectionQueryOperator, CollectionsOptions, DEFAULT_HTML_TEMPLATE, DEFAULT_MARKDOWN_EXTENSIONS, DefaultTheme, DocEntry, DocMember, DocsEntryPoint, DocsOptions, DocsSortStrategy, DocsSummary, type DocsTestFileOptions, type DocsTestHarnessOptions, DocsTestOptions, DocsTestRunError, type DocsTestRunResult, type DocsTestSource, type DocsTestWriteResult, EditThisPageOptions, EmojiShortcodeOptions, EntryPageConfig, type ExtractedCodeBlock, ExtractedDocs, FeatureConfig, Fragment, type FrameworkCodegenMode, type FrameworkCodegenTarget, type FrameworkComponentIsland, type FrameworkMarkdownOptions, type FrameworkRenderTarget, type FrameworkTransformData, type FrontmatterSchema, type GenerateVitePressMigrationConfigOptions, GeneratedDocsData, type GitHubLineRange, type GitHubOptions, type GitHubRepoData, type GitHubSourceData, type GitHubSourceRef, HeroAction, HeroConfig, HeroImage, HeroNotice, I18nOptions, type IncrementalMarkdownParseAppendOptions, type IncrementalMarkdownParseResult, IncrementalMarkdownParser, type IncrementalMarkdownParserOptions, type IncrementalMarkdownRenderAppendOptions, type IncrementalMarkdownRenderResult, IncrementalMarkdownRenderer, type IncrementalMarkdownRendererOptions, type IslandInfo, type JSXChild, type JSXElementType, type JSXNode, type JSXProps, type
|
|
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 };
|
|
4082
5151
|
//# sourceMappingURL=index.d.cts.map
|