diff --git a/docs/pages/config/full_example.mdx b/docs/pages/config/full_example.mdx index 9aefa81f..88a97d9f 100644 --- a/docs/pages/config/full_example.mdx +++ b/docs/pages/config/full_example.mdx @@ -3,7 +3,7 @@ This file need to be at the same place as your `next.config.js` file `server` in here could refer to a lambda function, a docker container, a node server or whatever that can support running nodejs code. (Even cloudflare workers in the future) -For more information about the options here, take a look at the [components section](/components/overview). +For more information about the options here, take a look at the [components section](/inner_workings/components/overview). ```ts import type { OpenNextConfig } from 'open-next/types/open-next' diff --git a/docs/pages/inner_workings.mdx b/docs/pages/inner_workings.mdx index 175f5e6b..ada07ea0 100644 --- a/docs/pages/inner_workings.mdx +++ b/docs/pages/inner_workings.mdx @@ -2,7 +2,7 @@ When calling `open-next build`, OpenNext **runs `next build`** to build the Next #### Building the Next.js app -OpenNext runs the `build` script in your `package.json` file. Depending on the lock file found in the app, the corresponding packager manager will be used. Either `npm run build`, `yarn build`, or `pnpm build` will be run. For more on customizing the build command, see [overriding the build command](/advanced/options#custom-build-command). +OpenNext runs the `build` script in your `package.json` file. Depending on the lock file found in the app, the corresponding packager manager will be used. Either `npm run build`, `yarn build`, or `pnpm build` will be run. You can overrride the build command by editing the `buildCommand` property in `open-next.config.ts`, see how-to in the [full example](/config/full_example). #### Transforming the build output diff --git a/docs/pages/inner_workings/architecture.mdx b/docs/pages/inner_workings/architecture.mdx index 6891699a..07853331 100644 --- a/docs/pages/inner_workings/architecture.mdx +++ b/docs/pages/inner_workings/architecture.mdx @@ -48,7 +48,7 @@ This backend handles image optimization requests when the Next.js `` comp Note that the image optimization backend responds with the `Cache-Control` header, so the image will be cached both at the CDN level and at the browser level. -See [Image Optimization](/features/image-optimization) for more details. +See [Image Optimization](/inner_workings/components/image_optimization) for more details. #### Servers Lambda backend diff --git a/docs/pages/v2/advanced/architecture.mdx b/docs/pages/v2/advanced/architecture.mdx index 09cbc63a..da2bb33c 100644 --- a/docs/pages/v2/advanced/architecture.mdx +++ b/docs/pages/v2/advanced/architecture.mdx @@ -165,7 +165,7 @@ Create a Lambda function using the code in the `.open-next/warmer-function` fold Also, create an EventBridge scheduled rule to invoke the warmer function every 5 minutes. -Read more on [how warming works](/inner_workings/warming). +Read more on [how warming works](/v2/inner_workings/warming). #### Dynamo Provider Function diff --git a/docs/pages/v2/common_issues.mdx b/docs/pages/v2/common_issues.mdx index 74e94d77..349d9a66 100644 --- a/docs/pages/v2/common_issues.mdx +++ b/docs/pages/v2/common_issues.mdx @@ -14,10 +14,10 @@ If you are using sentry, API routes returns empty body. You could try configurin #### My ISR page has this cache-control header `s-maxage=2, stale-while-revalidate=2592000` -Given how ISR works, while waiting for the revalidation to happen, the page will be served using this cache control header. This prevent your server from being overloaded by a lot of requests while the revalidation is done. You can read more about it [here](/inner_workings/isr). +Given how ISR works, while waiting for the revalidation to happen, the page will be served using this cache control header. This prevent your server from being overloaded by a lot of requests while the revalidation is done. You can read more about it [here](/v2/inner_workings/isr). #### Unzipped size must be smaller than 262144000 bytes AWS Lambda has an unzipped size limit of 250MB. If your app is over this limit, then it is most likely using a node_module library that is too large for serverless or there is a large dev dependency getting bundled. -For example, `pdfjs` has `canvas` optional dependency which takes up 180MB. For more details, [read me](/common_issues/bundle_size). +For example, `pdfjs` has `canvas` optional dependency which takes up 180MB. For more details, [read me](/v2/common_issues/bundle_size). Note: a large bundle size will increase cold start significantly. \ No newline at end of file diff --git a/docs/pages/v2/inner_workings/isr.mdx b/docs/pages/v2/inner_workings/isr.mdx index 2a32b361..4a4687b3 100644 --- a/docs/pages/v2/inner_workings/isr.mdx +++ b/docs/pages/v2/inner_workings/isr.mdx @@ -36,7 +36,7 @@ When we check if a page is stale, we check the `revalidatedAt` value for each re #### Cost - Be aware that fetch cache is using S3. `fetch` by default in next is cached, and even for SSR requests, it will be written to S3. This can lead to a lot of S3 requests and can be expensive. You can disable fetch cache by setting `cache` to `no-store` in the `fetch` options. Also see [this workaround](/common_issues/isr#patch-fetch-behaviour-for-isr-only-for-next1351) + Be aware that fetch cache is using S3. `fetch` by default in next is cached, and even for SSR requests, it will be written to S3. This can lead to a lot of S3 requests and can be expensive. You can disable fetch cache by setting `cache` to `no-store` in the `fetch` options. Also see [this workaround](/v2/common_issues/isr#patch-fetch-behaviour-for-isr-only-for-next1351) `get` will be called on every request to ISR and SSG that are not cached in Cloudfront, and `set` will be called on every revalidation.