Skip to content

Commit 0d7c430

Browse files
committed
fixup!
1 parent 67a346f commit 0d7c430

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

apps/site/components/withSearch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const loadOrama = async (db: AnyOrama): Promise<void> => {
4141
const response = await fetch(url);
4242
const fetchedDb = (await response.json()) as SerializedOramaDb;
4343

44-
return addPrefixToDocs(fetchedDb, `/${key}`);
44+
return addPrefixToDocs(fetchedDb, key);
4545
})
4646
);
4747

apps/site/next.constants.mjs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ export const DIST_URL =
6969
export const DOCS_URL =
7070
process.env.NEXT_PUBLIC_DOCS_URL || 'https://nodejs.org/docs/';
7171

72+
/**
73+
* This is used for any place that requires the Node.js Learn URL (which by default is nodejs.org/learn)
74+
*
75+
* Note that this is a custom Environment Variable that can be defined by us when necessary
76+
*/
77+
export const LEARN_URL =
78+
process.env.NEXT_PUBLIC_LEARN_URL || 'https://nodejs.org/learn/';
79+
7280
/**
7381
* Supports a manual override of the base path of the Website
7482
*
@@ -174,6 +182,6 @@ export const OPENCOLLECTIVE_MEMBERS_URL =
174182
* Orama DB URLs for the Learn and API sections of the website
175183
*/
176184
export const ORAMA_DB_URLS = {
177-
learn: 'https://nodejs.org/learn/orama-db.json',
178-
api: 'https://beta.docs.nodejs.org/orama-db.json',
185+
[LEARN_URL]: 'https://nodejs.org/learn/orama-db.json',
186+
[DOCS_URL]: 'https://beta.docs.nodejs.org/orama-db.json',
179187
};

0 commit comments

Comments
 (0)