Skip to content

Commit

Permalink
Force route handler to be dynamic to avoid errors
Browse files Browse the repository at this point in the history
Fix GITBOOK-OPEN-1WYY
Fix GITBOOK-OPEN-1WYX
  • Loading branch information
gregberge committed Jan 10, 2025
1 parent 16194c5 commit e488a46
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-cheetahs-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gitbook': patch
---

Force route handler to be dynamic to avoid errors
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { PageClientLayout } from './PageClientLayout';
import { PagePathParams, fetchPageData, getPathnameParam, normalizePathname } from '../../fetch';

export const runtime = 'edge';
export const dynamic = 'force-dynamic';

type Props = {
params: Promise<PagePathParams>;
Expand Down
1 change: 1 addition & 0 deletions packages/gitbook/src/app/(site)/(content)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { RocketLoaderDetector } from './RocketLoaderDetector';
import { fetchContentData } from '../fetch';

export const runtime = 'edge';
export const dynamic = 'force-dynamic';

/**
* Layout when rendering the content.
Expand Down
1 change: 1 addition & 0 deletions packages/gitbook/src/app/(space)/~gitbook/pdf/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { PrintButton } from './PrintButton';
const DEFAULT_LIMIT = 100;

export const runtime = 'edge';
export const dynamic = 'force-dynamic';

export async function generateMetadata(): Promise<Metadata> {
const ctx = getGitBookContextFromHeaders(await headers());
Expand Down

0 comments on commit e488a46

Please sign in to comment.