Skip to content

Commit bd0e979

Browse files
authored
fix: search index upload (supabase#32904)
Search index pipeline shouldn't be trying to read troubleshooting section yet (those are still searched via GH discussions). Trying to read it errors as they don't have the same frontmatter shape as other guides content.
1 parent 2b9d796 commit bd0e979

File tree

1 file changed

+8
-3
lines changed
  • apps/docs/scripts/search/sources

1 file changed

+8
-3
lines changed

apps/docs/scripts/search/sources/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { sep } from 'node:path'
12
import {
23
GitHubDiscussionLoader,
34
type GitHubDiscussionSource,
@@ -93,9 +94,13 @@ export async function fetchSources() {
9394
'spec/common-cli-sections.json'
9495
).load()
9596

96-
const guideSources = (await walk('content'))
97-
.filter(({ path }) => /\.mdx?$/.test(path))
98-
.filter(({ path }) => !ignoredFiles.includes(path))
97+
const guideSources = (await walk('content/guides'))
98+
.filter(
99+
({ path }) =>
100+
/\.mdx?$/.test(path) &&
101+
!ignoredFiles.includes(path) &&
102+
!path.split(sep).some((part) => part.startsWith('_'))
103+
)
99104
.map((entry) => new MarkdownLoader('guide', entry.path, { yaml: true }).load())
100105

101106
const partnerIntegrationSources = (await fetchPartners()).map((partner) =>

0 commit comments

Comments
 (0)