Force route handler to be dynamic to avoid errors (#2721)

This commit is contained in:
Greg Bergé
2025-01-10 16:26:25 +01:00
committed by GitHub
parent a6f65916f1
commit fde32e26bf
4 changed files with 8 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Force route handler to be dynamic to avoid errors
@@ -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>;
@@ -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.
@@ -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());