File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11import env from "@next/env" ;
2- import { updateSearchIndexes } from "./update-index.mjs" ;
32import type { Manifest } from "fumadocs-mdx" ;
43import { readFileSync } from "node:fs" ;
4+ import { updateSearchIndexes } from "./update-index.mjs" ;
55
66env . loadEnvConfig ( process . cwd ( ) ) ;
77
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ import path from "node:path";
66
77const getUrl = createGetUrl ( "/" ) ;
88
9- const appId = process . env . NEXT_PUBLIC_ALGOLIA_APP_ID ;
10- const apiKey = process . env . ALGOLIA_API_KEY ;
11-
129export async function updateSearchIndexes ( manifest : Manifest ) : Promise < void > {
10+ const appId = process . env . NEXT_PUBLIC_ALGOLIA_APP_ID ;
11+ const apiKey = process . env . ALGOLIA_API_KEY ;
12+
1313 if ( ! appId || ! apiKey ) {
1414 throw new Error ( "NEXT_PUBLIC_ALGOLIA_APP_ID, ALGOLIA_API_KEY are required" ) ;
1515 }
@@ -22,7 +22,7 @@ export async function updateSearchIndexes(manifest: Manifest): Promise<void> {
2222 . filter ( ( file ) => file . collection === "docs" )
2323 . map ( ( docs ) => {
2424 const url = getUrl (
25- getSlugs ( parseFilePath ( path . relative ( "content/" , docs . path ) ) ) ,
25+ getSlugs ( parseFilePath ( path . relative ( "content/docs/ " , docs . path ) ) ) ,
2626 ) ;
2727
2828 if ( ! docs . data . structuredData )
You can’t perform that action at this time.
0 commit comments