Skip to content

Commit d4392b2

Browse files
committed
feat: remove process.env.GEN_ORAMA_STATIC
1 parent 9bf3965 commit d4392b2

File tree

5 files changed

+1
-11
lines changed

5 files changed

+1
-11
lines changed

apps/docs/.env.example

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# https://fumadocs.dev/docs/mdx/async
2-
MDX_ASYNC=
32
LOCALE=en
4-
ORAMA_PRIVATE_API_KEY_EN=
5-
ORAMA_PRIVATE_API_KEY_ZH_HANS=
3+
ORAMA_PRIVATE_API=

apps/docs/src/app/(home)/blog/[slug]/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export async function generateMetadata(props: {
5858
}
5959

6060
export function generateStaticParams(): { slug: string }[] {
61-
if (process.env.GEN_DOC_STATIC !== 'true') return [];
6261
return blog.getPages().map((page) => ({
6362
slug: page.slugs[0],
6463
}));

apps/docs/src/app/docs/[[...slug]]/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ function DocsRelated({ page }: { page: DocsPage }) {
111111
}
112112

113113
export async function generateStaticParams() {
114-
if (process.env.GEN_DOC_STATIC !== 'true') return [];
115114
return docs.generateParams();
116115
}
117116

apps/docs/src/app/learn/[...slug]/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export default async function Docs(props: {
4040
}
4141

4242
export async function generateStaticParams() {
43-
if (process.env.GEN_DOC_STATIC !== 'true') return [];
4443
return learn.generateParams();
4544
}
4645

apps/docs/src/app/search-index/[page]/route.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ export async function GET(
1212
_req: Request,
1313
{ params }: { params: Promise<{ page: string }> },
1414
) {
15-
if (process.env.GEN_ORAMA_STATIC !== 'true') {
16-
throw notFound();
17-
}
1815
const { page = '0' } = await params;
1916
const locale = await getLocale();
2017

@@ -24,8 +21,6 @@ export async function GET(
2421
}
2522

2623
export function generateStaticParams() {
27-
if (process.env.GEN_ORAMA_STATIC !== 'true') return [];
28-
2924
const pages = docs.getPages();
3025
const pageSize = 20;
3126
const pageIndex = Math.ceil(pages.length / pageSize);

0 commit comments

Comments
 (0)