Skip to content

Commit 890bb7b

Browse files
authored
[Docs Site] Fix asides in non-docs collection pages (#23851)
1 parent 4c84518 commit 890bb7b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

patches/@astrojs+starlight+0.35.1.patch

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,24 @@ index a027f56..639be81 100644
1919
{entry.badge && (
2020
<Badge
2121
variant={entry.badge.variant}
22+
diff --git a/node_modules/@astrojs/starlight/integrations/remark-rehype-utils.ts b/node_modules/@astrojs/starlight/integrations/remark-rehype-utils.ts
23+
index 97ff09b..2015f29 100644
24+
--- a/node_modules/@astrojs/starlight/integrations/remark-rehype-utils.ts
25+
+++ b/node_modules/@astrojs/starlight/integrations/remark-rehype-utils.ts
26+
@@ -22,7 +22,12 @@ export function shouldTransformFile(file: VFile, docsCollectionPath: string) {
27+
if (!file?.path) return false;
28+
29+
// If the document is not part of the Starlight docs collection, skip it.
30+
- if (!normalizePath(file.path).startsWith(docsCollectionPath)) return false;
31+
+ if (
32+
+ !normalizePath(file.path).startsWith(docsCollectionPath) &&
33+
+ !normalizePath(file.path).includes("/src/content/partials/") &&
34+
+ !normalizePath(file.path).includes("/src/content/changelog/")
35+
+ )
36+
+ return false;
37+
38+
return true;
39+
}
2240
diff --git a/node_modules/@astrojs/starlight/user-components/Tabs.astro b/node_modules/@astrojs/starlight/user-components/Tabs.astro
2341
index 6d173df..61eed80 100644
2442
--- a/node_modules/@astrojs/starlight/user-components/Tabs.astro

0 commit comments

Comments
 (0)