blume 2.2.2 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/THIRD-PARTY-NOTICES.md +51 -0
  3. package/dist/cli/{chunk-kmswjxj9.js → chunk-0b1a8xqz.js} +3 -3
  4. package/dist/cli/{chunk-rtvgmg2j.js → chunk-0qx6vwwf.js} +2 -2
  5. package/dist/cli/{chunk-qcyxkj44.js → chunk-3ps63r91.js} +43 -17
  6. package/dist/cli/chunk-3ps63r91.js.map +15 -0
  7. package/dist/cli/{chunk-b680sv30.js → chunk-402xaaxn.js} +10 -8
  8. package/dist/cli/chunk-402xaaxn.js.map +13 -0
  9. package/dist/cli/{chunk-k45sq16q.js → chunk-49xa4yf2.js} +39 -23
  10. package/dist/cli/{chunk-k45sq16q.js.map → chunk-49xa4yf2.js.map} +3 -3
  11. package/dist/cli/{chunk-j4nfgn2j.js → chunk-51wr1wre.js} +1 -1
  12. package/dist/cli/{chunk-9jqmq5hv.js → chunk-531qbwn1.js} +6 -6
  13. package/dist/cli/{chunk-r5nm9w0c.js → chunk-5bp65pv4.js} +107 -37
  14. package/dist/cli/{chunk-r5nm9w0c.js.map → chunk-5bp65pv4.js.map} +11 -10
  15. package/dist/cli/{chunk-yg8ckc3g.js → chunk-6nvcjzts.js} +2 -2
  16. package/dist/cli/{chunk-x7bh6d9j.js → chunk-6v5w8vzd.js} +4 -4
  17. package/dist/cli/{chunk-f260jdrn.js → chunk-8cshtem6.js} +5 -5
  18. package/dist/cli/{chunk-ydqzkhjn.js → chunk-8h5ceyk0.js} +6 -6
  19. package/dist/cli/{chunk-e1n41w9m.js → chunk-8v90n67z.js} +3 -3
  20. package/dist/cli/{chunk-etckvbrh.js → chunk-98me5yas.js} +14 -14
  21. package/dist/cli/{chunk-hktq4j5r.js → chunk-9k7gg4ga.js} +16 -10
  22. package/dist/cli/{chunk-hktq4j5r.js.map → chunk-9k7gg4ga.js.map} +5 -5
  23. package/dist/cli/{chunk-34wap3ed.js → chunk-9qmc57zw.js} +3 -3
  24. package/dist/cli/{chunk-beb0z983.js → chunk-a1xmzxk2.js} +16 -16
  25. package/dist/cli/{chunk-gwy55cx3.js → chunk-ajw85dgf.js} +2 -2
  26. package/dist/cli/{chunk-69rjf786.js → chunk-ansqj08e.js} +5 -5
  27. package/dist/cli/{chunk-q1wwrxzw.js → chunk-b0vwhmdf.js} +3 -3
  28. package/dist/cli/chunk-b0vwhmdf.js.map +10 -0
  29. package/dist/cli/{chunk-nqna8dzp.js → chunk-b5gztt4j.js} +17 -17
  30. package/dist/cli/{chunk-fnxgtjeq.js → chunk-bc4jz2m4.js} +1 -1
  31. package/dist/cli/{chunk-aafhwx74.js → chunk-d4h1y312.js} +1 -1
  32. package/dist/cli/{chunk-080mfch6.js → chunk-et7zwqkg.js} +15 -15
  33. package/dist/cli/{chunk-487b95qy.js → chunk-f29q3j13.js} +41 -25
  34. package/dist/cli/{chunk-487b95qy.js.map → chunk-f29q3j13.js.map} +3 -3
  35. package/dist/cli/{chunk-c5bjxq8v.js → chunk-f72388jn.js} +2 -2
  36. package/dist/cli/{chunk-t2h8pwy1.js → chunk-g0hpwbyx.js} +4 -4
  37. package/dist/cli/{chunk-40vk8kgf.js → chunk-j102xmnk.js} +7 -7
  38. package/dist/cli/{chunk-ppa6mg4d.js → chunk-m54bz9ng.js} +6 -6
  39. package/dist/cli/{chunk-h0qwdbem.js → chunk-mt6njy68.js} +2 -2
  40. package/dist/cli/{chunk-2ssh60qh.js → chunk-n091sgam.js} +6 -6
  41. package/dist/cli/{chunk-1ch3ct3r.js → chunk-p33bf2nb.js} +14 -14
  42. package/dist/cli/{chunk-4zxh25hc.js → chunk-saxq5jjr.js} +2 -2
  43. package/dist/cli/{chunk-x60e15st.js → chunk-sbt1s5j2.js} +17 -17
  44. package/dist/cli/{chunk-gxhcf2hs.js → chunk-tckd6qwv.js} +2 -2
  45. package/dist/cli/{chunk-p834rkcn.js → chunk-tf4134kk.js} +5 -5
  46. package/dist/cli/{chunk-zxd5jrgx.js → chunk-vxdjss7f.js} +76 -34
  47. package/dist/cli/{chunk-zxd5jrgx.js.map → chunk-vxdjss7f.js.map} +4 -4
  48. package/dist/cli/{chunk-9h8mh2tk.js → chunk-x2pgg22t.js} +1 -1
  49. package/dist/cli/{chunk-hn3g2b89.js → chunk-xhrwrzrh.js} +9 -9
  50. package/dist/cli/index.js +18 -18
  51. package/dist/types/ai/ask-context.d.ts +8 -0
  52. package/dist/types/ai/link-text.d.ts +5 -0
  53. package/dist/types/ai/relative-links.d.ts +26 -6
  54. package/dist/types/core/config-input.d.ts +41 -1
  55. package/dist/types/core/data.d.ts +14 -0
  56. package/dist/types/core/last-modified.d.ts +33 -18
  57. package/dist/types/core/links.d.ts +16 -0
  58. package/dist/types/core/schema.d.ts +17 -1
  59. package/dist/types/core/types.d.ts +10 -0
  60. package/dist/types/deploy/sitemap.d.ts +9 -0
  61. package/dist/types/search/documents.d.ts +3 -1
  62. package/dist/types/search/fold.d.ts +33 -0
  63. package/dist/types/search/orama-index.d.ts +4 -4
  64. package/dist/types/seo/jsonld.d.ts +33 -0
  65. package/docs/configuration/search.mdx +2 -2
  66. package/docs/configuration/theming.mdx +13 -1
  67. package/docs/content/frontmatter.mdx +1 -1
  68. package/docs/content/i18n.mdx +1 -1
  69. package/docs/content/sources/remote-mdx.mdx +1 -1
  70. package/docs/discoverability/open-graph.mdx +16 -1
  71. package/docs/discoverability/sitemap-and-robots.mdx +12 -0
  72. package/docs/discoverability/structured-data.mdx +44 -0
  73. package/package.json +4 -3
  74. package/skills/blume-migrate/references/docus.md +1 -2
  75. package/skills/blume-migrate/references/docusaurus.md +1 -1
  76. package/skills/blume-migrate/references/vitepress.md +2 -2
  77. package/skills/blume-migrate/references/vuepress.md +1 -1
  78. package/src/ai/ask-context.ts +52 -14
  79. package/src/ai/ask-data.ts +4 -1
  80. package/src/ai/ask-tools.ts +17 -5
  81. package/src/ai/link-text.ts +6 -0
  82. package/src/ai/llms.ts +1 -7
  83. package/src/ai/markdown.ts +8 -4
  84. package/src/ai/relative-links.ts +155 -48
  85. package/src/ai/site-skill.ts +1 -4
  86. package/src/astro/generate.ts +7 -0
  87. package/src/astro/templates.ts +36 -20
  88. package/src/components/layout/Header.astro +18 -10
  89. package/src/components/layout/PageActions.astro +1 -0
  90. package/src/components/layout/PageLayout.astro +31 -13
  91. package/src/components/layout/ReferenceLayout.astro +6 -1
  92. package/src/components/layout/RootLayout.astro +13 -1
  93. package/src/components/layout/head-scripts.ts +5 -1
  94. package/src/components/layout/locale-redirect.ts +38 -19
  95. package/src/components/layout/search/types.ts +12 -4
  96. package/src/core/config-input.ts +40 -1
  97. package/src/core/config.ts +5 -2
  98. package/src/core/data.ts +14 -0
  99. package/src/core/last-modified.ts +80 -34
  100. package/src/core/links.ts +43 -2
  101. package/src/core/manifest.ts +2 -0
  102. package/src/core/project-graph.ts +83 -43
  103. package/src/core/schema.ts +48 -9
  104. package/src/core/types.ts +10 -0
  105. package/src/deploy/sitemap.ts +127 -49
  106. package/src/search/documents.ts +34 -11
  107. package/src/search/fold.ts +175 -0
  108. package/src/search/orama-index.ts +40 -49
  109. package/src/seo/jsonld.ts +100 -23
  110. package/src/theme/chrome-icons.ts +2 -1
  111. package/src/theme/entry.ts +4 -1
  112. package/dist/cli/chunk-b680sv30.js.map +0 -13
  113. package/dist/cli/chunk-q1wwrxzw.js.map +0 -10
  114. package/dist/cli/chunk-qcyxkj44.js.map +0 -14
  115. /package/dist/cli/{chunk-kmswjxj9.js.map → chunk-0b1a8xqz.js.map} +0 -0
  116. /package/dist/cli/{chunk-rtvgmg2j.js.map → chunk-0qx6vwwf.js.map} +0 -0
  117. /package/dist/cli/{chunk-j4nfgn2j.js.map → chunk-51wr1wre.js.map} +0 -0
  118. /package/dist/cli/{chunk-9jqmq5hv.js.map → chunk-531qbwn1.js.map} +0 -0
  119. /package/dist/cli/{chunk-yg8ckc3g.js.map → chunk-6nvcjzts.js.map} +0 -0
  120. /package/dist/cli/{chunk-x7bh6d9j.js.map → chunk-6v5w8vzd.js.map} +0 -0
  121. /package/dist/cli/{chunk-f260jdrn.js.map → chunk-8cshtem6.js.map} +0 -0
  122. /package/dist/cli/{chunk-ydqzkhjn.js.map → chunk-8h5ceyk0.js.map} +0 -0
  123. /package/dist/cli/{chunk-e1n41w9m.js.map → chunk-8v90n67z.js.map} +0 -0
  124. /package/dist/cli/{chunk-etckvbrh.js.map → chunk-98me5yas.js.map} +0 -0
  125. /package/dist/cli/{chunk-34wap3ed.js.map → chunk-9qmc57zw.js.map} +0 -0
  126. /package/dist/cli/{chunk-beb0z983.js.map → chunk-a1xmzxk2.js.map} +0 -0
  127. /package/dist/cli/{chunk-gwy55cx3.js.map → chunk-ajw85dgf.js.map} +0 -0
  128. /package/dist/cli/{chunk-69rjf786.js.map → chunk-ansqj08e.js.map} +0 -0
  129. /package/dist/cli/{chunk-nqna8dzp.js.map → chunk-b5gztt4j.js.map} +0 -0
  130. /package/dist/cli/{chunk-fnxgtjeq.js.map → chunk-bc4jz2m4.js.map} +0 -0
  131. /package/dist/cli/{chunk-aafhwx74.js.map → chunk-d4h1y312.js.map} +0 -0
  132. /package/dist/cli/{chunk-080mfch6.js.map → chunk-et7zwqkg.js.map} +0 -0
  133. /package/dist/cli/{chunk-c5bjxq8v.js.map → chunk-f72388jn.js.map} +0 -0
  134. /package/dist/cli/{chunk-t2h8pwy1.js.map → chunk-g0hpwbyx.js.map} +0 -0
  135. /package/dist/cli/{chunk-40vk8kgf.js.map → chunk-j102xmnk.js.map} +0 -0
  136. /package/dist/cli/{chunk-ppa6mg4d.js.map → chunk-m54bz9ng.js.map} +0 -0
  137. /package/dist/cli/{chunk-h0qwdbem.js.map → chunk-mt6njy68.js.map} +0 -0
  138. /package/dist/cli/{chunk-2ssh60qh.js.map → chunk-n091sgam.js.map} +0 -0
  139. /package/dist/cli/{chunk-1ch3ct3r.js.map → chunk-p33bf2nb.js.map} +0 -0
  140. /package/dist/cli/{chunk-4zxh25hc.js.map → chunk-saxq5jjr.js.map} +0 -0
  141. /package/dist/cli/{chunk-x60e15st.js.map → chunk-sbt1s5j2.js.map} +0 -0
  142. /package/dist/cli/{chunk-gxhcf2hs.js.map → chunk-tckd6qwv.js.map} +0 -0
  143. /package/dist/cli/{chunk-p834rkcn.js.map → chunk-tf4134kk.js.map} +0 -0
  144. /package/dist/cli/{chunk-9h8mh2tk.js.map → chunk-x2pgg22t.js.map} +0 -0
  145. /package/dist/cli/{chunk-hn3g2b89.js.map → chunk-xhrwrzrh.js.map} +0 -0
@@ -390,4 +390,4 @@ var analyzeComponentOverrides = (source, filePath) => {
390
390
  export { emptyComponentOverrides, ComponentOverridesError, analyzeComponentOverrides };
391
391
 
392
392
  //# debugId=59653B23465A56F364756E2164756E21
393
- //# sourceMappingURL=chunk-j4nfgn2j.js.map
393
+ //# sourceMappingURL=chunk-51wr1wre.js.map
@@ -11,17 +11,17 @@ import {
11
11
  import {
12
12
  AGENTS,
13
13
  launchAgent
14
- } from "./chunk-aafhwx74.js";
14
+ } from "./chunk-d4h1y312.js";
15
15
  import {
16
16
  YAML_SCHEMA
17
- } from "./chunk-r5nm9w0c.js";
17
+ } from "./chunk-5bp65pv4.js";
18
18
  import {
19
19
  scanProject
20
- } from "./chunk-zxd5jrgx.js";
20
+ } from "./chunk-vxdjss7f.js";
21
21
  import"./chunk-zccbjcj0.js";
22
22
  import {
23
23
  buildMcpData
24
- } from "./chunk-b680sv30.js";
24
+ } from "./chunk-402xaaxn.js";
25
25
  import {
26
26
  seconds,
27
27
  money,
@@ -34,7 +34,7 @@ import {
34
34
  } from "./chunk-0n9xkp3d.js";
35
35
  import {
36
36
  parseTimeoutSeconds
37
- } from "./chunk-fnxgtjeq.js";
37
+ } from "./chunk-bc4jz2m4.js";
38
38
 
39
39
  // src/cli/commands/eval.ts
40
40
  import { existsSync } from "node:fs";
@@ -698,4 +698,4 @@ export {
698
698
  };
699
699
 
700
700
  //# debugId=A08E98490DA10DBB64756E2164756E21
701
- //# sourceMappingURL=chunk-9jqmq5hv.js.map
701
+ //# sourceMappingURL=chunk-531qbwn1.js.map
@@ -6231,6 +6231,7 @@ var buildFallbackRoutes = (graph, i18n, alternatesByKey, basePath, versionAltern
6231
6231
  locale: code,
6232
6232
  monolingual: source.monolingual,
6233
6233
  path,
6234
+ published: source.published,
6234
6235
  source: source.source,
6235
6236
  sourcePath: source.sourcePath,
6236
6237
  title: source.title,
@@ -6275,6 +6276,7 @@ var buildManifest = (options) => {
6275
6276
  locale: page.locale,
6276
6277
  monolingual: page.monolingual,
6277
6278
  path: page.route,
6279
+ published: page.published,
6278
6280
  source: page.source,
6279
6281
  sourcePath: page.sourcePath,
6280
6282
  title: page.title,
@@ -6874,6 +6876,18 @@ var resolveRelativeHref = (href, from, resolveFile, hasRoute) => {
6874
6876
  const fileRoute = DOC_EXT.test(path) ? resolveFile?.(file) ?? resolveFile?.(otherDocExtension(file)) : undefined;
6875
6877
  return `${fileRoute ?? toRoute(resolveRelative(from.route, path, from.isIndex))}${suffix}`;
6876
6878
  };
6879
+ var resolveRawRelativeHref = (href, route, hasRoute) => {
6880
+ if (href === "" || NOT_RELATIVE.test(href)) {
6881
+ return;
6882
+ }
6883
+ const suffixAt = href.search(/[?#]/u);
6884
+ const path = suffixAt === -1 ? href : href.slice(0, suffixAt);
6885
+ const resolved = resolveRelative(route, path, false);
6886
+ if (FILE_EXT.test(path) && !DOC_EXT.test(path) && !hasRoute(decodePercent2(resolved))) {
6887
+ return;
6888
+ }
6889
+ return `${resolved}${suffixAt === -1 ? "" : href.slice(suffixAt)}`;
6890
+ };
6877
6891
  var resolveRootFileHref = (href, options) => {
6878
6892
  if (!isInternalPath(href)) {
6879
6893
  return;
@@ -7074,6 +7088,7 @@ var buildFileRouteIndex = (pages, i18n) => {
7074
7088
  return { byDefaultNavPath, byEntryId, bySource };
7075
7089
  };
7076
7090
  var routeOfLinkedFile = (index, from, path) => index.bySource.get(resolve3(dirname2(from.sourcePath), path)) ?? index.byDefaultNavPath.get(normalize2(join4(dirname2(from.navPath), path)));
7091
+ var routeOfLinkedEntry = (index, entryId, path) => index.byEntryId.get(normalize2(join4(dirname2(entryId), path)));
7077
7092
  var relativeTarget = (page, rawPath, ctx) => {
7078
7093
  const base = { isIndex: isIndexPage(page), route: page.route };
7079
7094
  const { entryId, navPath, sourcePath } = page;
@@ -7081,7 +7096,7 @@ var relativeTarget = (page, rawPath, ctx) => {
7081
7096
  if (sourcePath) {
7082
7097
  resolveFile = (path) => routeOfLinkedFile(ctx.fileRoutes, { navPath, sourcePath }, path);
7083
7098
  } else if (entryId) {
7084
- resolveFile = (path) => ctx.fileRoutes.byEntryId.get(normalize2(join4(dirname2(entryId), path)));
7099
+ resolveFile = (path) => routeOfLinkedEntry(ctx.fileRoutes, entryId, path);
7085
7100
  }
7086
7101
  return resolveRelativeHref(rawPath, base, resolveFile, (route) => ctx.routes.has(route)) ?? resolveRelative(page.route, rawPath, base.isIndex);
7087
7102
  };
@@ -12145,7 +12160,8 @@ var themeConfigFields = {
12145
12160
  mono: fontValueSchema.default("ibm-plex-mono")
12146
12161
  }).prefault({}),
12147
12162
  mode: z70.enum(["system", "light", "dark"]).default("system"),
12148
- radius: z70.enum(["none", "sm", "md", "lg"]).default("md")
12163
+ radius: z70.enum(["none", "sm", "md", "lg"]).default("md"),
12164
+ toggle: z70.boolean().default(true)
12149
12165
  };
12150
12166
  var themeConfigSchema = z70.strictObject(themeConfigFields, removedKeysHint({
12151
12167
  layout: "theme.layout was removed: the sidebar layout is the only one, so delete the field."
@@ -12505,6 +12521,7 @@ var ogConfigSchema = z70.strictObject({
12505
12521
  description: z70.union([z70.string(), z70.literal(false)]).optional(),
12506
12522
  enabled: z70.boolean().optional(),
12507
12523
  fonts: z70.array(ogFontSchema).optional(),
12524
+ image: localizableLabelSchema.optional(),
12508
12525
  logo: z70.union([z70.string(), z70.literal(false)]).optional(),
12509
12526
  palette: ogPaletteSchema.optional(),
12510
12527
  site: z70.union([z70.string(), z70.literal(false)]).optional(),
@@ -12557,6 +12574,14 @@ var softwareConfigSchema = z70.strictObject({
12557
12574
  sameAs: z70.array(z70.url()).default([])
12558
12575
  });
12559
12576
  var seoConfigFields = {
12577
+ datePublished: z70.union([z70.literal(false), z70.literal("git")]).default(false),
12578
+ jsonLd: z70.strictObject({
12579
+ author: z70.strictObject({ "@id": z70.url() }).optional(),
12580
+ organizationId: z70.url().optional(),
12581
+ publisher: z70.strictObject({ "@id": z70.url() }).optional(),
12582
+ website: z70.boolean().optional(),
12583
+ websiteId: z70.url().optional()
12584
+ }).prefault({}),
12560
12585
  metatags: z70.record(z70.string().min(1), z70.string()).optional().superRefine((tags, ctx) => {
12561
12586
  for (const name of Object.keys(tags ?? {})) {
12562
12587
  const owner = ownedMetatag(name);
@@ -12573,7 +12598,10 @@ var seoConfigFields = {
12573
12598
  organization: organizationConfigSchema.optional(),
12574
12599
  robots: z70.boolean().default(true),
12575
12600
  rss: rssConfigSchema.prefault({}),
12576
- sitemap: z70.boolean().default(true),
12601
+ sitemap: z70.union([
12602
+ z70.boolean(),
12603
+ z70.strictObject({ alternates: z70.boolean().default(false) })
12604
+ ]).default(true),
12577
12605
  software: z70.union([z70.boolean(), softwareConfigSchema]).optional().transform((value) => {
12578
12606
  if (value === true) {
12579
12607
  return softwareConfigSchema.parse({});
@@ -15351,6 +15379,9 @@ ${items}
15351
15379
  `;
15352
15380
  };
15353
15381
 
15382
+ // src/ai/link-text.ts
15383
+ var linkText2 = (title) => title.replaceAll(/[\\[\]]/gu, String.raw`\$&`);
15384
+
15354
15385
  // src/ai/relative-links.ts
15355
15386
  import { basename as basename4 } from "pathe";
15356
15387
  var MAYBE_RELATIVE = /\]\([\t ]*<?(?![a-z][\d+.a-z-]*:|\/|#)|^ {0,3}\[[^\]\n]+\]:[\t ]*<?(?![a-z][\d+.a-z-]*:|\/|#)|\shref=["'](?![a-z][\d+.a-z-]*:|\/|#)/imu;
@@ -15380,40 +15411,77 @@ var collectSplices2 = (text, routed, imaged) => {
15380
15411
  }
15381
15412
  return splices;
15382
15413
  };
15383
- var relativeLinkRewriter = (project) => {
15414
+ var linkIndexes = new WeakMap;
15415
+ var linkIndex = (project) => {
15416
+ let index = linkIndexes.get(project);
15417
+ if (!index) {
15418
+ const { config, graph, manifest } = project;
15419
+ index = {
15420
+ fileRoutes: buildFileRouteIndex(graph.pages, config.i18n ?? null),
15421
+ localeByRoute: new Map(manifest.routes.map((route) => [route.path, route.locale])),
15422
+ navPathBySource: new Map(graph.pages.map((page) => [page.sourcePath, page.navPath])),
15423
+ routes: new Set(manifest.routes.map((route) => route.path))
15424
+ };
15425
+ linkIndexes.set(project, index);
15426
+ }
15427
+ return index;
15428
+ };
15429
+ var snapshotRoute = (project) => {
15430
+ const pageRoutes = new Map(project.graph.pages.map((page) => [page.id, page.route]));
15431
+ const rendered = new Map;
15432
+ for (const route of project.manifest.routes) {
15433
+ const page = route.fallback ? pageRoutes.get(route.id) : undefined;
15434
+ if (page !== undefined) {
15435
+ rendered.set(route.path, page);
15436
+ }
15437
+ }
15438
+ return (route) => {
15439
+ const suffixAt = route.search(/[?#]/u);
15440
+ const path = suffixAt === -1 ? route : route.slice(0, suffixAt);
15441
+ const page = rendered.get(path);
15442
+ return page === undefined ? route : `${page}${route.slice(path.length)}`;
15443
+ };
15444
+ };
15445
+ var relativeLinkRewriter = (project, options = {}) => {
15384
15446
  const { basePath, deployment, i18n } = project.config;
15385
15447
  const deployBase = normalizeBasePath(deployment.options.base);
15386
15448
  const contentRoot = resolveDocsCollection(project.config, project.context.root).base;
15387
15449
  const localeTokens = i18n ? ["$", ...i18n.locales.map((locale) => locale.code)] : [];
15388
- const fileRoutes = buildFileRouteIndex(project.graph.pages, i18n ?? null);
15389
- const navPathBySource = new Map(project.graph.pages.map((graphPage) => [
15390
- graphPage.sourcePath,
15391
- graphPage.navPath
15392
- ]));
15393
- const routes = new Set(project.manifest.routes.map((route) => route.path));
15394
- const localeByRoute = new Map(project.manifest.routes.map((route) => [route.path, route.locale]));
15450
+ const { fileRoutes, localeByRoute, navPathBySource, routes } = linkIndex(project);
15451
+ const hasRoute = (path) => routes.has(path);
15452
+ const land = options.assistant ? snapshotRoute(project) : (route) => mountBasePath(deployBase, route);
15453
+ const rootLinksOf = (route) => {
15454
+ if (options.assistant) {
15455
+ return;
15456
+ }
15457
+ const locale = localeByRoute.get(route);
15458
+ const localize = i18n && locale !== undefined && localePrefix(locale, i18n) !== "" ? { basePath, deployBase, i18n, locale, routes } : undefined;
15459
+ return deployBase !== "" || basePath !== "" || localize !== undefined ? { localize } : undefined;
15460
+ };
15395
15461
  const relativeRoute = (page) => {
15396
- const { sourcePath } = page;
15397
- if (!sourcePath) {
15462
+ const { entryId, sourcePath } = page;
15463
+ const file = sourcePath ?? entryId;
15464
+ if (!file) {
15398
15465
  return;
15399
15466
  }
15400
15467
  const from = {
15401
- isIndex: isIndexFileName(basename4(sourcePath), localeTokens),
15468
+ isIndex: isIndexFileName(basename4(file), localeTokens),
15402
15469
  route: page.route
15403
15470
  };
15404
- const navPath = navPathBySource.get(sourcePath) ?? basename4(sourcePath);
15405
- const resolveFile = (path) => routeOfLinkedFile(fileRoutes, { navPath, sourcePath }, path);
15406
- return (target) => {
15407
- const route = resolveRelativeHref(target, from, resolveFile, (path) => routes.has(path));
15408
- return route === undefined ? undefined : mountBasePath(deployBase, route);
15409
- };
15471
+ let resolveFile;
15472
+ if (sourcePath) {
15473
+ const navPath = navPathBySource.get(sourcePath) ?? basename4(sourcePath);
15474
+ resolveFile = (path) => routeOfLinkedFile(fileRoutes, { navPath, sourcePath }, path);
15475
+ } else {
15476
+ resolveFile = (path) => routeOfLinkedEntry(fileRoutes, file, path);
15477
+ }
15478
+ return (target) => resolveRelativeHref(target, from, resolveFile, hasRoute);
15410
15479
  };
15411
15480
  const servesPage = (route) => servesRoute(routes, route);
15412
15481
  return (text, page) => {
15413
- const locale = localeByRoute.get(page.route);
15414
- const localize = i18n && locale !== undefined && localePrefix(locale, i18n) !== "" ? { basePath, deployBase, i18n, locale, routes } : undefined;
15415
- const rootLinks = deployBase !== "" || basePath !== "" || localize !== undefined;
15416
- if (!(page.sourcePath || rootLinks) || !((rootLinks ? MAYBE_PAGE_LINK : MAYBE_RELATIVE).test(text) || MAYBE_ROOT_FILE.test(text))) {
15482
+ const rootLinks = rootLinksOf(page.route);
15483
+ const localize = rootLinks?.localize;
15484
+ if (!(page.sourcePath || page.entryId || rootLinks) || !((rootLinks ? MAYBE_PAGE_LINK : MAYBE_RELATIVE).test(text) || MAYBE_ROOT_FILE.test(text))) {
15417
15485
  return text;
15418
15486
  }
15419
15487
  const relative = relativeRoute(page);
@@ -15431,17 +15499,19 @@ var relativeLinkRewriter = (project) => {
15431
15499
  if (route === undefined) {
15432
15500
  return;
15433
15501
  }
15434
- const based = mountBasePath(deployBase, route);
15435
- return localize ? localizeHref(based, localize) : based;
15502
+ const landed = land(route);
15503
+ return localize ? localizeHref(landed, localize) : landed;
15436
15504
  };
15437
15505
  const routed = (target, raw) => {
15438
15506
  if (!isInternalPath(target)) {
15439
- return relative?.(target);
15507
+ const route = raw ? resolveRawRelativeHref(target, page.route, hasRoute) : relative?.(target);
15508
+ return route === undefined ? undefined : land(route);
15440
15509
  }
15441
- return (raw ? undefined : rootFile(target)) ?? rooted(target);
15510
+ const file = raw ? undefined : rootFile(target);
15511
+ return file ?? (rootLinks ? rooted(target) : undefined);
15442
15512
  };
15443
15513
  const imaged = (target) => {
15444
- const based = withBasePath(deployBase, target);
15514
+ const based = rootLinks ? withBasePath(deployBase, target) : target;
15445
15515
  return based === target ? undefined : based;
15446
15516
  };
15447
15517
  const lines = text.split(`
@@ -18541,7 +18611,6 @@ var pageUrl = (route, site, base = "") => {
18541
18611
  const path = mountBasePath(base, route);
18542
18612
  return encodeURI(site ? absoluteUrl2(site, path) : path);
18543
18613
  };
18544
- var linkText2 = (title) => title.replaceAll(/[\\[\]]/gu, String.raw`\$&`);
18545
18614
  var oneLine2 = (text) => text.replaceAll(/\s+/gu, " ").trim();
18546
18615
  var agentResourceLines = (project) => {
18547
18616
  const { config } = project;
@@ -18690,15 +18759,15 @@ var buildRawMarkdown = async (project) => {
18690
18759
  const pageById = new Map(project.graph.pages.map((page) => [page.id, page]));
18691
18760
  const components = projectComponentSerializers(project);
18692
18761
  const rewriteLinks = relativeLinkRewriter(project);
18693
- const readRoute = async (route) => {
18694
- const page = pageById.get(route.id);
18762
+ const readRoute = async (route, page) => {
18695
18763
  if (page) {
18696
18764
  return await readExpandedEntryText(project, page);
18697
18765
  }
18698
18766
  return route.sourcePath ? await readFile7(route.sourcePath, "utf-8") : "";
18699
18767
  };
18700
18768
  const entries = await Promise.all(project.manifest.routes.map(async (route) => {
18701
- let text = await readRoute(route);
18769
+ const page = pageById.get(route.id);
18770
+ let text = await readRoute(route, page);
18702
18771
  if (route.sourcePath) {
18703
18772
  text = rewriteRelativeAssets({
18704
18773
  deployBase: project.config.deployment.options.base,
@@ -18708,6 +18777,7 @@ var buildRawMarkdown = async (project) => {
18708
18777
  });
18709
18778
  }
18710
18779
  text = rewriteLinks(text, {
18780
+ entryId: page?.entryId,
18711
18781
  route: route.path,
18712
18782
  sourcePath: route.sourcePath
18713
18783
  });
@@ -21201,7 +21271,7 @@ ${moreIssues}`
21201
21271
  }
21202
21272
  const config = applyDeploymentEnv(parsed.data);
21203
21273
  const site = config.deployment.options.site ?? options.devServerUrl;
21204
- const ogEnabled = config.seo.og.enabled ?? Boolean(site);
21274
+ const ogEnabled = config.seo.og.enabled ?? (Boolean(site) && !config.seo.og.image);
21205
21275
  return {
21206
21276
  config: {
21207
21277
  ...config,
@@ -21217,7 +21287,7 @@ ${moreIssues}`
21217
21287
  };
21218
21288
  };
21219
21289
 
21220
- export { i18nEnabled, localeCodes, resolveFallbackLocale, localizeRoute, localizeInternalPath, localeTargetPath, i18nDiagnostics, routeSetFor, OPENAPI_PATH, API_PAGES_PATH, API_PAGE_PATH, API_NAVIGATION_PATH, API_SEARCH_PATH, apiNamePhrase, resolveReferences, referenceRoutes, blumeReferences, referenceSpecFiles, hasScalarReferences, builtinProxyReferences, apiPagesUseBuiltinProxy, needsPlaygroundProxy, API_CATALOG_PATH, hasApiCatalog, buildApiCatalog, buildMcpDiscovery, asciiSlugify, buildMcpServerCard, YAML_SCHEMA, frontmatter_default, AGENT_SKILLS_INDEX_PATH, servesSkillsIndex, AI_CATALOG_PATH, ARD_MANIFEST_PATH, hasAiCatalog, buildAiCatalog, buildHomeLinkHeader, resolveLocalizable, sourcesOfKind, resolveDocsCollection, CHANGELOG_INDEX_ROUTE, hasChangelogIndex, withChangelogIndexText, discoverPages, discoverPagesSync, customStaticRoutes, routeIsTaken, hasGeneratedChangelog, navTargetRoutes, customOgRoutes, nextFenceState, resolveRelativeImage, hashText, pollingWatch, snapshotCache, loadWithCache, MARKDOWN_BODY_FEATURES, MDX_BODY_FEATURES, TOC_HIDDEN_KEY, TOC_TEXT_KEY, parseHeadingMarkers, BUILTIN_MDX_TAGS, BUILTIN_CHILD_PROPS, isExpression, pageKey, folderChildKeys, normalizeRef, isPageRef, pagesByRef, buildNavigation, resolveAskBackend, captchaSettings, parseApiEndpoint, deployPassthrough, RATE_LIMIT_BINDING, GOOGLE_FONTS, isFontSlug, fontLocaleCodes, localeFontSubsets, buildFontEntries, buildFontsCss, configuredFonts, PUBLIC_API_URL, repoUrl, editBaseUrl, apiUrl, EN_UI, resolveUIStrings, isBuiltInMcpClient, isPatternPath, bareRedirect, compileEveryRedirect, matchCompiledRedirect, requestPath, patternDestination, pathsUnderPattern, hasVariables, substituteVariables, undefinedVariables, BUILT_IN_PAGE_META_KEYS, folderMetaSchema, VERSION_ID, VERSION_LIKE, versionizeRoute, versionsDiagnostics, slugify, slugifyPath, unloadablePathDiagnostic, frontmatterYamlDiagnostic, ATTRIBUTE, trailingCurlyMarker, HTML_COMMENT, INLINE_CODE, scanBody, extractHeadings, strippedLineOffset, isStringValue, placeEntryRef, resolveEntryRoute, localizedRoute, normalizeEntry, hasIncludeStatements, expandIncludes, buildIncludeGraph, readExpandedEntryText, rewriteRelativeAssets, collectContentAssets, youtubeEmbedSrc, componentRegistry, downlevelComponentNode, downlevelComponents, isHiddenPage, contentIndexable, buildManifest, buildRssFeeds, renderRssFeed, gradeExternal, probeAll, staticFileResolver, validateLinks, HTTP_METHODS, withServerDefaults, TEMPLATES, PACKAGE_MANAGERS, commandsFor, cdCommand, detectPackageManager, detectProjectPackageManager, validateContentDir, titleize, outsidePnpmWorkspace, workspaceNote, buildPlan, applyPlan, readExistingPackage, nextSteps, nodeRequire, readOverlaidSpec, escapeMarkdownText, guardBlockStart, renderInline, renderInlineMdx, destination, linkParts, headingPrefix, blockquote, listItem, indent, codeFence, image, writesMdx, unsupported, joinBlocks, markdownDocument, absoluteUrl, neutralizeUnsafeLinks, columnsPrefix, isOpenApiSource, openApiSource, projectComponentSerializers, applyAudienceVisibility, agentMarkdown, buildRawMarkdown, markdownRoutePaths, isJsonObject, getPath, isStringValue2, asString, asObject, asNumber, objectsIn, SIGNATURES_DIRECTORY_PATH, buildSignaturesDirectory, SVG_ASSET_HEADERS, mirroredPage, applyBaseToAstroRedirects, isPageIndexFile, withMirrorRedirects, platformRedirects, distDir, adapterRoot, deployPlatform, parseColor, composite, contrastRatio, MIN_TEXT_CONTRAST, themeInk, labelOn, resolveAccent, resolveAction, resolveRadius, buildThemeCss, createModuleLoader, findConfigFile, findComponentsFile, resolveRuntimeDir, resolveProjectContext, ConfigValidationError, loadConfig };
21290
+ export { i18nEnabled, localeCodes, resolveFallbackLocale, localizeRoute, localizeInternalPath, localeTargetPath, i18nDiagnostics, routeSetFor, OPENAPI_PATH, API_PAGES_PATH, API_PAGE_PATH, API_NAVIGATION_PATH, API_SEARCH_PATH, apiNamePhrase, resolveReferences, referenceRoutes, blumeReferences, referenceSpecFiles, hasScalarReferences, builtinProxyReferences, apiPagesUseBuiltinProxy, needsPlaygroundProxy, API_CATALOG_PATH, hasApiCatalog, buildApiCatalog, buildMcpDiscovery, asciiSlugify, buildMcpServerCard, YAML_SCHEMA, frontmatter_default, AGENT_SKILLS_INDEX_PATH, servesSkillsIndex, AI_CATALOG_PATH, ARD_MANIFEST_PATH, hasAiCatalog, buildAiCatalog, buildHomeLinkHeader, resolveLocalizable, sourcesOfKind, resolveDocsCollection, CHANGELOG_INDEX_ROUTE, hasChangelogIndex, withChangelogIndexText, discoverPages, discoverPagesSync, customStaticRoutes, routeIsTaken, hasGeneratedChangelog, navTargetRoutes, customOgRoutes, nextFenceState, resolveRelativeImage, hashText, pollingWatch, snapshotCache, loadWithCache, MARKDOWN_BODY_FEATURES, MDX_BODY_FEATURES, TOC_HIDDEN_KEY, TOC_TEXT_KEY, parseHeadingMarkers, BUILTIN_MDX_TAGS, BUILTIN_CHILD_PROPS, isExpression, pageKey, folderChildKeys, normalizeRef, isPageRef, pagesByRef, buildNavigation, resolveAskBackend, captchaSettings, parseApiEndpoint, deployPassthrough, RATE_LIMIT_BINDING, GOOGLE_FONTS, isFontSlug, fontLocaleCodes, localeFontSubsets, buildFontEntries, buildFontsCss, configuredFonts, PUBLIC_API_URL, repoUrl, editBaseUrl, apiUrl, EN_UI, resolveUIStrings, isBuiltInMcpClient, isPatternPath, bareRedirect, compileEveryRedirect, matchCompiledRedirect, requestPath, patternDestination, pathsUnderPattern, hasVariables, substituteVariables, undefinedVariables, BUILT_IN_PAGE_META_KEYS, folderMetaSchema, VERSION_ID, VERSION_LIKE, versionizeRoute, versionsDiagnostics, slugify, slugifyPath, unloadablePathDiagnostic, frontmatterYamlDiagnostic, ATTRIBUTE, trailingCurlyMarker, HTML_COMMENT, INLINE_CODE, scanBody, extractHeadings, strippedLineOffset, isStringValue, placeEntryRef, resolveEntryRoute, localizedRoute, normalizeEntry, hasIncludeStatements, expandIncludes, buildIncludeGraph, readExpandedEntryText, rewriteRelativeAssets, collectContentAssets, youtubeEmbedSrc, componentRegistry, downlevelComponentNode, downlevelComponents, isHiddenPage, contentIndexable, buildManifest, buildRssFeeds, renderRssFeed, gradeExternal, probeAll, staticFileResolver, validateLinks, relativeLinkRewriter, HTTP_METHODS, withServerDefaults, TEMPLATES, PACKAGE_MANAGERS, commandsFor, cdCommand, detectPackageManager, detectProjectPackageManager, validateContentDir, titleize, outsidePnpmWorkspace, workspaceNote, buildPlan, applyPlan, readExistingPackage, nextSteps, nodeRequire, readOverlaidSpec, escapeMarkdownText, guardBlockStart, renderInline, renderInlineMdx, destination, linkParts, headingPrefix, blockquote, listItem, indent, codeFence, image, writesMdx, unsupported, joinBlocks, markdownDocument, absoluteUrl, neutralizeUnsafeLinks, columnsPrefix, isOpenApiSource, openApiSource, projectComponentSerializers, applyAudienceVisibility, agentMarkdown, buildRawMarkdown, markdownRoutePaths, isJsonObject, getPath, isStringValue2, asString, asObject, asNumber, objectsIn, SIGNATURES_DIRECTORY_PATH, buildSignaturesDirectory, SVG_ASSET_HEADERS, mirroredPage, applyBaseToAstroRedirects, isPageIndexFile, withMirrorRedirects, platformRedirects, distDir, adapterRoot, deployPlatform, parseColor, composite, contrastRatio, MIN_TEXT_CONTRAST, themeInk, labelOn, resolveAccent, resolveAction, resolveRadius, buildThemeCss, createModuleLoader, findConfigFile, findComponentsFile, resolveRuntimeDir, resolveProjectContext, ConfigValidationError, loadConfig };
21221
21291
 
21222
- //# debugId=1BA20ABDE3123AC364756E2164756E21
21223
- //# sourceMappingURL=chunk-r5nm9w0c.js.map
21292
+ //# debugId=97AE7A868B18EA3664756E2164756E21
21293
+ //# sourceMappingURL=chunk-5bp65pv4.js.map