File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -69,6 +69,14 @@ export const DIST_URL =
6969export 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 */
176184export 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} ;
You can’t perform that action at this time.
0 commit comments