blume 2.2.2 → 2.2.3

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 (133) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cli/{chunk-080mfch6.js → chunk-0wt5amrk.js} +15 -15
  3. package/dist/cli/{chunk-k45sq16q.js → chunk-0xyedh7k.js} +39 -23
  4. package/dist/cli/{chunk-k45sq16q.js.map → chunk-0xyedh7k.js.map} +3 -3
  5. package/dist/cli/{chunk-f260jdrn.js → chunk-0ynr0fr7.js} +5 -5
  6. package/dist/cli/{chunk-e1n41w9m.js → chunk-1ay3hzn0.js} +3 -3
  7. package/dist/cli/{chunk-b680sv30.js → chunk-2f6btenb.js} +10 -8
  8. package/dist/cli/chunk-2f6btenb.js.map +13 -0
  9. package/dist/cli/{chunk-gwy55cx3.js → chunk-426rytg6.js} +2 -2
  10. package/dist/cli/{chunk-9h8mh2tk.js → chunk-5f96yq2c.js} +1 -1
  11. package/dist/cli/{chunk-x60e15st.js → chunk-5xq12jz7.js} +17 -17
  12. package/dist/cli/{chunk-x7bh6d9j.js → chunk-6xag1c83.js} +4 -4
  13. package/dist/cli/{chunk-487b95qy.js → chunk-88q28zav.js} +41 -25
  14. package/dist/cli/{chunk-487b95qy.js.map → chunk-88q28zav.js.map} +3 -3
  15. package/dist/cli/{chunk-yg8ckc3g.js → chunk-88zkpg89.js} +2 -2
  16. package/dist/cli/{chunk-ppa6mg4d.js → chunk-8fm3b4vm.js} +6 -6
  17. package/dist/cli/{chunk-rtvgmg2j.js → chunk-8h2t2vyj.js} +2 -2
  18. package/dist/cli/{chunk-2ssh60qh.js → chunk-982qfeny.js} +6 -6
  19. package/dist/cli/{chunk-t2h8pwy1.js → chunk-9emfspcp.js} +4 -4
  20. package/dist/cli/{chunk-9jqmq5hv.js → chunk-akj2p7k1.js} +6 -6
  21. package/dist/cli/{chunk-beb0z983.js → chunk-b664x65a.js} +16 -16
  22. package/dist/cli/{chunk-kmswjxj9.js → chunk-b7n58hgj.js} +3 -3
  23. package/dist/cli/{chunk-fnxgtjeq.js → chunk-c0qddrxr.js} +1 -1
  24. package/dist/cli/{chunk-p834rkcn.js → chunk-g62vnvaw.js} +5 -5
  25. package/dist/cli/{chunk-zxd5jrgx.js → chunk-gc7knd2s.js} +76 -34
  26. package/dist/cli/{chunk-zxd5jrgx.js.map → chunk-gc7knd2s.js.map} +4 -4
  27. package/dist/cli/{chunk-r5nm9w0c.js → chunk-hwjspffr.js} +105 -36
  28. package/dist/cli/{chunk-r5nm9w0c.js.map → chunk-hwjspffr.js.map} +11 -10
  29. package/dist/cli/{chunk-40vk8kgf.js → chunk-p4fe7tax.js} +7 -7
  30. package/dist/cli/{chunk-34wap3ed.js → chunk-psg2za5z.js} +3 -3
  31. package/dist/cli/{chunk-hktq4j5r.js → chunk-pxp1y6yz.js} +16 -10
  32. package/dist/cli/{chunk-hktq4j5r.js.map → chunk-pxp1y6yz.js.map} +4 -4
  33. package/dist/cli/{chunk-qcyxkj44.js → chunk-qax1aekz.js} +43 -17
  34. package/dist/cli/chunk-qax1aekz.js.map +15 -0
  35. package/dist/cli/{chunk-h0qwdbem.js → chunk-r5ajrw1g.js} +2 -2
  36. package/dist/cli/{chunk-q1wwrxzw.js → chunk-rc2qk3qx.js} +3 -3
  37. package/dist/cli/chunk-rc2qk3qx.js.map +10 -0
  38. package/dist/cli/{chunk-69rjf786.js → chunk-ry2ymbxf.js} +5 -5
  39. package/dist/cli/{chunk-gxhcf2hs.js → chunk-t43g7v22.js} +2 -2
  40. package/dist/cli/{chunk-ydqzkhjn.js → chunk-x0jqyq1g.js} +6 -6
  41. package/dist/cli/{chunk-aafhwx74.js → chunk-x25s4gph.js} +1 -1
  42. package/dist/cli/{chunk-nqna8dzp.js → chunk-xkx216rd.js} +17 -17
  43. package/dist/cli/{chunk-etckvbrh.js → chunk-xv8nkt56.js} +14 -14
  44. package/dist/cli/{chunk-hn3g2b89.js → chunk-yrmw5n2b.js} +9 -9
  45. package/dist/cli/{chunk-4zxh25hc.js → chunk-zgca0vxs.js} +2 -2
  46. package/dist/cli/{chunk-c5bjxq8v.js → chunk-zj6bcx0n.js} +2 -2
  47. package/dist/cli/{chunk-1ch3ct3r.js → chunk-zjfwzrvd.js} +14 -14
  48. package/dist/cli/{chunk-j4nfgn2j.js → chunk-znwhf37a.js} +1 -1
  49. package/dist/cli/index.js +18 -18
  50. package/dist/types/ai/ask-context.d.ts +8 -0
  51. package/dist/types/ai/link-text.d.ts +5 -0
  52. package/dist/types/ai/relative-links.d.ts +26 -6
  53. package/dist/types/core/config-input.d.ts +35 -1
  54. package/dist/types/core/data.d.ts +14 -0
  55. package/dist/types/core/last-modified.d.ts +33 -18
  56. package/dist/types/core/links.d.ts +16 -0
  57. package/dist/types/core/schema.d.ts +16 -1
  58. package/dist/types/core/types.d.ts +10 -0
  59. package/dist/types/deploy/sitemap.d.ts +9 -0
  60. package/dist/types/search/documents.d.ts +3 -1
  61. package/dist/types/search/fold.d.ts +33 -0
  62. package/dist/types/search/orama-index.d.ts +4 -4
  63. package/dist/types/seo/jsonld.d.ts +33 -0
  64. package/docs/configuration/search.mdx +2 -2
  65. package/docs/content/frontmatter.mdx +1 -1
  66. package/docs/content/i18n.mdx +1 -1
  67. package/docs/content/sources/remote-mdx.mdx +1 -1
  68. package/docs/discoverability/open-graph.mdx +16 -1
  69. package/docs/discoverability/sitemap-and-robots.mdx +12 -0
  70. package/docs/discoverability/structured-data.mdx +44 -0
  71. package/package.json +1 -1
  72. package/src/ai/ask-context.ts +52 -14
  73. package/src/ai/ask-data.ts +4 -1
  74. package/src/ai/ask-tools.ts +17 -5
  75. package/src/ai/link-text.ts +6 -0
  76. package/src/ai/llms.ts +1 -7
  77. package/src/ai/markdown.ts +8 -4
  78. package/src/ai/relative-links.ts +155 -48
  79. package/src/ai/site-skill.ts +1 -4
  80. package/src/astro/generate.ts +7 -0
  81. package/src/astro/templates.ts +36 -20
  82. package/src/components/layout/PageLayout.astro +25 -12
  83. package/src/components/layout/RootLayout.astro +7 -0
  84. package/src/components/layout/locale-redirect.ts +38 -19
  85. package/src/components/layout/search/types.ts +12 -4
  86. package/src/core/config-input.ts +34 -1
  87. package/src/core/config.ts +5 -2
  88. package/src/core/data.ts +14 -0
  89. package/src/core/last-modified.ts +80 -34
  90. package/src/core/links.ts +43 -2
  91. package/src/core/manifest.ts +2 -0
  92. package/src/core/project-graph.ts +83 -43
  93. package/src/core/schema.ts +47 -9
  94. package/src/core/types.ts +10 -0
  95. package/src/deploy/sitemap.ts +127 -49
  96. package/src/search/documents.ts +34 -11
  97. package/src/search/fold.ts +175 -0
  98. package/src/search/orama-index.ts +40 -49
  99. package/src/seo/jsonld.ts +100 -23
  100. package/dist/cli/chunk-b680sv30.js.map +0 -13
  101. package/dist/cli/chunk-q1wwrxzw.js.map +0 -10
  102. package/dist/cli/chunk-qcyxkj44.js.map +0 -14
  103. /package/dist/cli/{chunk-080mfch6.js.map → chunk-0wt5amrk.js.map} +0 -0
  104. /package/dist/cli/{chunk-f260jdrn.js.map → chunk-0ynr0fr7.js.map} +0 -0
  105. /package/dist/cli/{chunk-e1n41w9m.js.map → chunk-1ay3hzn0.js.map} +0 -0
  106. /package/dist/cli/{chunk-gwy55cx3.js.map → chunk-426rytg6.js.map} +0 -0
  107. /package/dist/cli/{chunk-9h8mh2tk.js.map → chunk-5f96yq2c.js.map} +0 -0
  108. /package/dist/cli/{chunk-x60e15st.js.map → chunk-5xq12jz7.js.map} +0 -0
  109. /package/dist/cli/{chunk-x7bh6d9j.js.map → chunk-6xag1c83.js.map} +0 -0
  110. /package/dist/cli/{chunk-yg8ckc3g.js.map → chunk-88zkpg89.js.map} +0 -0
  111. /package/dist/cli/{chunk-ppa6mg4d.js.map → chunk-8fm3b4vm.js.map} +0 -0
  112. /package/dist/cli/{chunk-rtvgmg2j.js.map → chunk-8h2t2vyj.js.map} +0 -0
  113. /package/dist/cli/{chunk-2ssh60qh.js.map → chunk-982qfeny.js.map} +0 -0
  114. /package/dist/cli/{chunk-t2h8pwy1.js.map → chunk-9emfspcp.js.map} +0 -0
  115. /package/dist/cli/{chunk-9jqmq5hv.js.map → chunk-akj2p7k1.js.map} +0 -0
  116. /package/dist/cli/{chunk-beb0z983.js.map → chunk-b664x65a.js.map} +0 -0
  117. /package/dist/cli/{chunk-kmswjxj9.js.map → chunk-b7n58hgj.js.map} +0 -0
  118. /package/dist/cli/{chunk-fnxgtjeq.js.map → chunk-c0qddrxr.js.map} +0 -0
  119. /package/dist/cli/{chunk-p834rkcn.js.map → chunk-g62vnvaw.js.map} +0 -0
  120. /package/dist/cli/{chunk-40vk8kgf.js.map → chunk-p4fe7tax.js.map} +0 -0
  121. /package/dist/cli/{chunk-34wap3ed.js.map → chunk-psg2za5z.js.map} +0 -0
  122. /package/dist/cli/{chunk-h0qwdbem.js.map → chunk-r5ajrw1g.js.map} +0 -0
  123. /package/dist/cli/{chunk-69rjf786.js.map → chunk-ry2ymbxf.js.map} +0 -0
  124. /package/dist/cli/{chunk-gxhcf2hs.js.map → chunk-t43g7v22.js.map} +0 -0
  125. /package/dist/cli/{chunk-ydqzkhjn.js.map → chunk-x0jqyq1g.js.map} +0 -0
  126. /package/dist/cli/{chunk-aafhwx74.js.map → chunk-x25s4gph.js.map} +0 -0
  127. /package/dist/cli/{chunk-nqna8dzp.js.map → chunk-xkx216rd.js.map} +0 -0
  128. /package/dist/cli/{chunk-etckvbrh.js.map → chunk-xv8nkt56.js.map} +0 -0
  129. /package/dist/cli/{chunk-hn3g2b89.js.map → chunk-yrmw5n2b.js.map} +0 -0
  130. /package/dist/cli/{chunk-4zxh25hc.js.map → chunk-zgca0vxs.js.map} +0 -0
  131. /package/dist/cli/{chunk-c5bjxq8v.js.map → chunk-zj6bcx0n.js.map} +0 -0
  132. /package/dist/cli/{chunk-1ch3ct3r.js.map → chunk-zjfwzrvd.js.map} +0 -0
  133. /package/dist/cli/{chunk-j4nfgn2j.js.map → chunk-znwhf37a.js.map} +0 -0
@@ -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
  };
@@ -12505,6 +12520,7 @@ var ogConfigSchema = z70.strictObject({
12505
12520
  description: z70.union([z70.string(), z70.literal(false)]).optional(),
12506
12521
  enabled: z70.boolean().optional(),
12507
12522
  fonts: z70.array(ogFontSchema).optional(),
12523
+ image: localizableLabelSchema.optional(),
12508
12524
  logo: z70.union([z70.string(), z70.literal(false)]).optional(),
12509
12525
  palette: ogPaletteSchema.optional(),
12510
12526
  site: z70.union([z70.string(), z70.literal(false)]).optional(),
@@ -12557,6 +12573,14 @@ var softwareConfigSchema = z70.strictObject({
12557
12573
  sameAs: z70.array(z70.url()).default([])
12558
12574
  });
12559
12575
  var seoConfigFields = {
12576
+ datePublished: z70.union([z70.literal(false), z70.literal("git")]).default(false),
12577
+ jsonLd: z70.strictObject({
12578
+ author: z70.strictObject({ "@id": z70.url() }).optional(),
12579
+ organizationId: z70.url().optional(),
12580
+ publisher: z70.strictObject({ "@id": z70.url() }).optional(),
12581
+ website: z70.boolean().optional(),
12582
+ websiteId: z70.url().optional()
12583
+ }).prefault({}),
12560
12584
  metatags: z70.record(z70.string().min(1), z70.string()).optional().superRefine((tags, ctx) => {
12561
12585
  for (const name of Object.keys(tags ?? {})) {
12562
12586
  const owner = ownedMetatag(name);
@@ -12573,7 +12597,10 @@ var seoConfigFields = {
12573
12597
  organization: organizationConfigSchema.optional(),
12574
12598
  robots: z70.boolean().default(true),
12575
12599
  rss: rssConfigSchema.prefault({}),
12576
- sitemap: z70.boolean().default(true),
12600
+ sitemap: z70.union([
12601
+ z70.boolean(),
12602
+ z70.strictObject({ alternates: z70.boolean().default(false) })
12603
+ ]).default(true),
12577
12604
  software: z70.union([z70.boolean(), softwareConfigSchema]).optional().transform((value) => {
12578
12605
  if (value === true) {
12579
12606
  return softwareConfigSchema.parse({});
@@ -15351,6 +15378,9 @@ ${items}
15351
15378
  `;
15352
15379
  };
15353
15380
 
15381
+ // src/ai/link-text.ts
15382
+ var linkText2 = (title) => title.replaceAll(/[\\[\]]/gu, String.raw`\$&`);
15383
+
15354
15384
  // src/ai/relative-links.ts
15355
15385
  import { basename as basename4 } from "pathe";
15356
15386
  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 +15410,77 @@ var collectSplices2 = (text, routed, imaged) => {
15380
15410
  }
15381
15411
  return splices;
15382
15412
  };
15383
- var relativeLinkRewriter = (project) => {
15413
+ var linkIndexes = new WeakMap;
15414
+ var linkIndex = (project) => {
15415
+ let index = linkIndexes.get(project);
15416
+ if (!index) {
15417
+ const { config, graph, manifest } = project;
15418
+ index = {
15419
+ fileRoutes: buildFileRouteIndex(graph.pages, config.i18n ?? null),
15420
+ localeByRoute: new Map(manifest.routes.map((route) => [route.path, route.locale])),
15421
+ navPathBySource: new Map(graph.pages.map((page) => [page.sourcePath, page.navPath])),
15422
+ routes: new Set(manifest.routes.map((route) => route.path))
15423
+ };
15424
+ linkIndexes.set(project, index);
15425
+ }
15426
+ return index;
15427
+ };
15428
+ var snapshotRoute = (project) => {
15429
+ const pageRoutes = new Map(project.graph.pages.map((page) => [page.id, page.route]));
15430
+ const rendered = new Map;
15431
+ for (const route of project.manifest.routes) {
15432
+ const page = route.fallback ? pageRoutes.get(route.id) : undefined;
15433
+ if (page !== undefined) {
15434
+ rendered.set(route.path, page);
15435
+ }
15436
+ }
15437
+ return (route) => {
15438
+ const suffixAt = route.search(/[?#]/u);
15439
+ const path = suffixAt === -1 ? route : route.slice(0, suffixAt);
15440
+ const page = rendered.get(path);
15441
+ return page === undefined ? route : `${page}${route.slice(path.length)}`;
15442
+ };
15443
+ };
15444
+ var relativeLinkRewriter = (project, options = {}) => {
15384
15445
  const { basePath, deployment, i18n } = project.config;
15385
15446
  const deployBase = normalizeBasePath(deployment.options.base);
15386
15447
  const contentRoot = resolveDocsCollection(project.config, project.context.root).base;
15387
15448
  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]));
15449
+ const { fileRoutes, localeByRoute, navPathBySource, routes } = linkIndex(project);
15450
+ const hasRoute = (path) => routes.has(path);
15451
+ const land = options.assistant ? snapshotRoute(project) : (route) => mountBasePath(deployBase, route);
15452
+ const rootLinksOf = (route) => {
15453
+ if (options.assistant) {
15454
+ return;
15455
+ }
15456
+ const locale = localeByRoute.get(route);
15457
+ const localize = i18n && locale !== undefined && localePrefix(locale, i18n) !== "" ? { basePath, deployBase, i18n, locale, routes } : undefined;
15458
+ return deployBase !== "" || basePath !== "" || localize !== undefined ? { localize } : undefined;
15459
+ };
15395
15460
  const relativeRoute = (page) => {
15396
- const { sourcePath } = page;
15397
- if (!sourcePath) {
15461
+ const { entryId, sourcePath } = page;
15462
+ const file = sourcePath ?? entryId;
15463
+ if (!file) {
15398
15464
  return;
15399
15465
  }
15400
15466
  const from = {
15401
- isIndex: isIndexFileName(basename4(sourcePath), localeTokens),
15467
+ isIndex: isIndexFileName(basename4(file), localeTokens),
15402
15468
  route: page.route
15403
15469
  };
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
- };
15470
+ let resolveFile;
15471
+ if (sourcePath) {
15472
+ const navPath = navPathBySource.get(sourcePath) ?? basename4(sourcePath);
15473
+ resolveFile = (path) => routeOfLinkedFile(fileRoutes, { navPath, sourcePath }, path);
15474
+ } else {
15475
+ resolveFile = (path) => routeOfLinkedEntry(fileRoutes, file, path);
15476
+ }
15477
+ return (target) => resolveRelativeHref(target, from, resolveFile, hasRoute);
15410
15478
  };
15411
15479
  const servesPage = (route) => servesRoute(routes, route);
15412
15480
  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))) {
15481
+ const rootLinks = rootLinksOf(page.route);
15482
+ const localize = rootLinks?.localize;
15483
+ if (!(page.sourcePath || page.entryId || rootLinks) || !((rootLinks ? MAYBE_PAGE_LINK : MAYBE_RELATIVE).test(text) || MAYBE_ROOT_FILE.test(text))) {
15417
15484
  return text;
15418
15485
  }
15419
15486
  const relative = relativeRoute(page);
@@ -15431,17 +15498,19 @@ var relativeLinkRewriter = (project) => {
15431
15498
  if (route === undefined) {
15432
15499
  return;
15433
15500
  }
15434
- const based = mountBasePath(deployBase, route);
15435
- return localize ? localizeHref(based, localize) : based;
15501
+ const landed = land(route);
15502
+ return localize ? localizeHref(landed, localize) : landed;
15436
15503
  };
15437
15504
  const routed = (target, raw) => {
15438
15505
  if (!isInternalPath(target)) {
15439
- return relative?.(target);
15506
+ const route = raw ? resolveRawRelativeHref(target, page.route, hasRoute) : relative?.(target);
15507
+ return route === undefined ? undefined : land(route);
15440
15508
  }
15441
- return (raw ? undefined : rootFile(target)) ?? rooted(target);
15509
+ const file = raw ? undefined : rootFile(target);
15510
+ return file ?? (rootLinks ? rooted(target) : undefined);
15442
15511
  };
15443
15512
  const imaged = (target) => {
15444
- const based = withBasePath(deployBase, target);
15513
+ const based = rootLinks ? withBasePath(deployBase, target) : target;
15445
15514
  return based === target ? undefined : based;
15446
15515
  };
15447
15516
  const lines = text.split(`
@@ -18541,7 +18610,6 @@ var pageUrl = (route, site, base = "") => {
18541
18610
  const path = mountBasePath(base, route);
18542
18611
  return encodeURI(site ? absoluteUrl2(site, path) : path);
18543
18612
  };
18544
- var linkText2 = (title) => title.replaceAll(/[\\[\]]/gu, String.raw`\$&`);
18545
18613
  var oneLine2 = (text) => text.replaceAll(/\s+/gu, " ").trim();
18546
18614
  var agentResourceLines = (project) => {
18547
18615
  const { config } = project;
@@ -18690,15 +18758,15 @@ var buildRawMarkdown = async (project) => {
18690
18758
  const pageById = new Map(project.graph.pages.map((page) => [page.id, page]));
18691
18759
  const components = projectComponentSerializers(project);
18692
18760
  const rewriteLinks = relativeLinkRewriter(project);
18693
- const readRoute = async (route) => {
18694
- const page = pageById.get(route.id);
18761
+ const readRoute = async (route, page) => {
18695
18762
  if (page) {
18696
18763
  return await readExpandedEntryText(project, page);
18697
18764
  }
18698
18765
  return route.sourcePath ? await readFile7(route.sourcePath, "utf-8") : "";
18699
18766
  };
18700
18767
  const entries = await Promise.all(project.manifest.routes.map(async (route) => {
18701
- let text = await readRoute(route);
18768
+ const page = pageById.get(route.id);
18769
+ let text = await readRoute(route, page);
18702
18770
  if (route.sourcePath) {
18703
18771
  text = rewriteRelativeAssets({
18704
18772
  deployBase: project.config.deployment.options.base,
@@ -18708,6 +18776,7 @@ var buildRawMarkdown = async (project) => {
18708
18776
  });
18709
18777
  }
18710
18778
  text = rewriteLinks(text, {
18779
+ entryId: page?.entryId,
18711
18780
  route: route.path,
18712
18781
  sourcePath: route.sourcePath
18713
18782
  });
@@ -21201,7 +21270,7 @@ ${moreIssues}`
21201
21270
  }
21202
21271
  const config = applyDeploymentEnv(parsed.data);
21203
21272
  const site = config.deployment.options.site ?? options.devServerUrl;
21204
- const ogEnabled = config.seo.og.enabled ?? Boolean(site);
21273
+ const ogEnabled = config.seo.og.enabled ?? (Boolean(site) && !config.seo.og.image);
21205
21274
  return {
21206
21275
  config: {
21207
21276
  ...config,
@@ -21217,7 +21286,7 @@ ${moreIssues}`
21217
21286
  };
21218
21287
  };
21219
21288
 
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 };
21289
+ 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
21290
 
21222
- //# debugId=1BA20ABDE3123AC364756E2164756E21
21223
- //# sourceMappingURL=chunk-r5nm9w0c.js.map
21291
+ //# debugId=84BE184C076646CF64756E2164756E21
21292
+ //# sourceMappingURL=chunk-hwjspffr.js.map