Skip to content

Commit 91f180d

Browse files
committed
feat: add env GEN_ORAMA_STATIC
1 parent 7b82e4c commit 91f180d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/update-search-index.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
- name: Build docs app
2626
shell: bash
2727
run: pnpm build:docs
28+
env:
29+
GEN_ORAMA_STATIC: "true"
30+
MDX_ASYNC: "true"
31+
NODE_OPTIONS: "--max-old-space-size=8192"
2832
- name: Run search index update
2933
shell: bash
3034
run: pnpm run update-search-index

apps/docs/src/app/[locale]/static/[page]/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export async function GET(
2222
}
2323

2424
export function generateStaticParams() {
25+
if (process.env.GEN_ORAMA_STATIC !== 'true') return [];
26+
2527
const params = routing.locales.flatMap((locale) => {
2628
const source = sourceMap[locale];
2729
const pages = source.getPages();
@@ -35,6 +37,6 @@ export function generateStaticParams() {
3537
};
3638
});
3739
});
38-
// console.log('params', params);
40+
console.log('orama generateStaticParams', params);
3941
return params;
4042
}

0 commit comments

Comments
 (0)