Commit 4ca0393c authored by Cursor Agent's avatar Cursor Agent

Fix preview-mode documentation links in CMS examples

Update all references from /docs/advanced-features/preview-mode to /docs/pages/guides/preview-mode across multiple CMS integration examples
Co-authored-by: 's avatarismael <ismael@vercel.com>
parent b3f77636
...@@ -284,8 +284,8 @@ Then set each variable on `.env.local`: ...@@ -284,8 +284,8 @@ Then set each variable on `.env.local`:
- `AGILITY_CMS_GUID` should be the **Instance GUID** field - `AGILITY_CMS_GUID` should be the **Instance GUID** field
- `AGILITY_CMS_API_FETCH_KEY` should be the **Live API Key** field - `AGILITY_CMS_API_FETCH_KEY` should be the **Live API Key** field
- `AGILITY_CMS_API_PREVIEW_KEY` should be the **Preview API Key** field - this is used when the site is in [Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode) and allows your site to pull the latest content, regardless of whether it is published or not. - `AGILITY_CMS_API_PREVIEW_KEY` should be the **Preview API Key** field - this is used when the site is in [Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode) and allows your site to pull the latest content, regardless of whether it is published or not.
- `AGILITY_CMS_SECURITY_KEY` should be the **Security Key** field that can be found in **Settings** > **Global Security** - this is used to communicate between the CMS and your site to validate [Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode) - `AGILITY_CMS_SECURITY_KEY` should be the **Security Key** field that can be found in **Settings** > **Global Security** - this is used to communicate between the CMS and your site to validate [Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode)
Your `.env.local` file should look like this: Your `.env.local` file should look like this:
...@@ -328,7 +328,7 @@ Alternatively, you can deploy using our template by clicking on the Deploy butto ...@@ -328,7 +328,7 @@ Alternatively, you can deploy using our template by clicking on the Deploy butto
### Step 18. Try preview mode ### Step 18. Try preview mode
Now that you've deployed your app to Vercel, take note of the URL of your deployed site. This will be registered in Agility CMS so that when editors click the `Preview` button within Agility CMS, your app is loaded in **Preview Mode**. Learn more about [Next.js Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode)). Now that you've deployed your app to Vercel, take note of the URL of your deployed site. This will be registered in Agility CMS so that when editors click the `Preview` button within Agility CMS, your app is loaded in **Preview Mode**. Learn more about [Next.js Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode)).
To enable the Preview Mode, you'll need to add your site to **Domain Configuration** in Agility CMS: To enable the Preview Mode, you'll need to add your site to **Domain Configuration** in Agility CMS:
......
...@@ -126,7 +126,7 @@ Most importantly, **do not publish** the blog post. Instead, click **Save Draft* ...@@ -126,7 +126,7 @@ Most importantly, **do not publish** the blog post. Instead, click **Save Draft*
If you have not already, set `PREVIEW=false` in your `.env.local` file and restart your local If you have not already, set `PREVIEW=false` in your `.env.local` file and restart your local
development server. development server.
Now, if you go to the your blog list view page on localhost: [http://localhost:3000/#blog](http://localhost:3000/#blog), you won't see this post, as its status has not yet been updated to `published`. However, if you use **Preview Mode** by deleting `PREVIEW=false` from your `.env.local` file, your new post will appear ([Documentation](https://nextjs.org/docs/advanced-features/preview-mode)). Now, if you go to the your blog list view page on localhost: [http://localhost:3000/#blog](http://localhost:3000/#blog), you won't see this post, as its status has not yet been updated to `published`. However, if you use **Preview Mode** by deleting `PREVIEW=false` from your `.env.local` file, your new post will appear ([Documentation](https://nextjs.org/docs/pages/guides/preview-mode)).
**Tip**: [You can set a preview URL on ButterCMS](https://buttercms.com/kb/preview-urls) for pages **Tip**: [You can set a preview URL on ButterCMS](https://buttercms.com/kb/preview-urls) for pages
deployed to Vercel, allowing you to live-preview changes on the web from within your Butter account! Sweet! deployed to Vercel, allowing you to live-preview changes on the web from within your Butter account! Sweet!
......
...@@ -83,7 +83,7 @@ Then set each variable on `.env.local`: ...@@ -83,7 +83,7 @@ Then set each variable on `.env.local`:
- `COSMIC_BUCKET_SLUG` should be the **Bucket slug** key under **API Access**. - `COSMIC_BUCKET_SLUG` should be the **Bucket slug** key under **API Access**.
- `COSMIC_READ_KEY` should be the **Read Key** under **API Access**. - `COSMIC_READ_KEY` should be the **Read Key** under **API Access**.
- `COSMIC_PREVIEW_SECRET` can be any random string (but avoid spaces) - this is used for [Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode). - `COSMIC_PREVIEW_SECRET` can be any random string (but avoid spaces) - this is used for [Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode).
Your `.env.local` file should look like this: Your `.env.local` file should look like this:
...@@ -127,7 +127,7 @@ On Cosmic, go to one of the posts you've created and: ...@@ -127,7 +127,7 @@ On Cosmic, go to one of the posts you've created and:
- **Update the title**. For example, you can add `[Draft]` in front of the title. - **Update the title**. For example, you can add `[Draft]` in front of the title.
- Click **Save Draft**, but **DO NOT** click **Publish**. By doing this, the post will be in the draft state. - Click **Save Draft**, but **DO NOT** click **Publish**. By doing this, the post will be in the draft state.
Now, if you go to the post page directly on localhost, you won't see the updated title. However, if you use the **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/advanced-features/preview-mode)). Now, if you go to the post page directly on localhost, you won't see the **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/pages/guides/preview-mode)).
Next, click the Preview Link button on the Post to see the updated title. (Screenshot below) Next, click the Preview Link button on the Post to see the updated title. (Screenshot below)
......
...@@ -128,7 +128,7 @@ cp .env.local.example .env.local ...@@ -128,7 +128,7 @@ cp .env.local.example .env.local
Then set each variable on `.env.local`: Then set each variable on `.env.local`:
- `DATOCMS_API_TOKEN` should be the API token you just copied. - `DATOCMS_API_TOKEN` should be the API token you just copied.
- `DATOCMS_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [the Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode). - `DATOCMS_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [the Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode).
Your `.env.local` file should look like this: Your `.env.local` file should look like this:
...@@ -160,7 +160,7 @@ On DatoCMS, go to one of the posts you've created and: ...@@ -160,7 +160,7 @@ On DatoCMS, go to one of the posts you've created and:
(If it doesn't become draft, you need to go to the model settings for `Post`, go to **Additional Settings**, and turn on **Enable draft/published system**.) (If it doesn't become draft, you need to go to the model settings for `Post`, go to **Additional Settings**, and turn on **Enable draft/published system**.)
Now, if you go to the post page on localhost, you won't see the updated title. However, if you use the **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/advanced-features/preview-mode)). Now, if you go to the post page on localhost, you won't see the updated title. However, if you use the **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/pages/guides/preview-mode)).
To enable the Preview Mode, go to this URL: To enable the Preview Mode, go to this URL:
......
...@@ -304,7 +304,7 @@ ENTERSPEED_PREVIEW_SECRET ...@@ -304,7 +304,7 @@ ENTERSPEED_PREVIEW_SECRET
### Step 8. Try preview mode ### Step 8. Try preview mode
If you go to `http://localhost:3000`, you won’t see your preview data. However, if you enable **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/advanced-features/preview-mode)). If you go to `http://localhost:3000`, you won’t see your preview data. However, if you enable **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/pages/guides/preview-mode)).
To enable Preview Mode, go to this URL: To enable Preview Mode, go to this URL:
......
...@@ -87,7 +87,7 @@ Then set each variable in `.env.local`: ...@@ -87,7 +87,7 @@ Then set each variable in `.env.local`:
- `GRAPHCMS_PROJECT_API`: Set it to the API endpoint under **Endpoints**, at the top of the page. - `GRAPHCMS_PROJECT_API`: Set it to the API endpoint under **Endpoints**, at the top of the page.
- `GRAPHCMS_PROD_AUTH_TOKEN`: Copy the `NEXT_EXAMPLE_CMS_GCMS_PROD_AUTH_TOKEN` token under **Existing tokens**, at the bottom of the page. This will only query content that is published. - `GRAPHCMS_PROD_AUTH_TOKEN`: Copy the `NEXT_EXAMPLE_CMS_GCMS_PROD_AUTH_TOKEN` token under **Existing tokens**, at the bottom of the page. This will only query content that is published.
- `GRAPHCMS_DEV_AUTH_TOKEN`: Copy the `NEXT_EXAMPLE_CMS_GCMS_DEV_AUTH_TOKEN` token under **Existing tokens**, at the bottom of the page. This will only query content that is in draft. - `GRAPHCMS_DEV_AUTH_TOKEN`: Copy the `NEXT_EXAMPLE_CMS_GCMS_DEV_AUTH_TOKEN` token under **Existing tokens**, at the bottom of the page. This will only query content that is in draft.
- `GRAPHCMS_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode). - `GRAPHCMS_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode).
### Step 4. Run Next.js in development mode ### Step 4. Run Next.js in development mode
...@@ -110,7 +110,7 @@ In GraphCMS, go to one of the posts in your project and: ...@@ -110,7 +110,7 @@ In GraphCMS, go to one of the posts in your project and:
- **Update the title**. For example, you can add `[Draft]` in front of the title. - **Update the title**. For example, you can add `[Draft]` in front of the title.
- After you edit the document save the article as a draft, but **DO NOT** click **Publish**. By doing this, the post will be in the draft stage. - After you edit the document save the article as a draft, but **DO NOT** click **Publish**. By doing this, the post will be in the draft stage.
Now, if you go to the post page on localhost, you won't see the updated title. However, if you use **Preview Mode**, you'll be able to see the change ([Documentation](/docs/advanced-features/preview-mode.md)). Now, if you go to the post page on localhost, you won't see the updated title. However, if you use **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/pages/guides/preview-mode)).
To view the preview, transform the url to the following format: `http://localhost:3000/api/preview?secret=<YOUR_SECRET_TOKEN>&slug=<SLUG_TO_PREVIEW>` where `<YOUR_SECRET_TOKEN>` is the same secret you defined in the `.env.local` file and `<SLUG_TO_PREVIEW>` is the slug of one of the posts you want to preview. To view the preview, transform the url to the following format: `http://localhost:3000/api/preview?secret=<YOUR_SECRET_TOKEN>&slug=<SLUG_TO_PREVIEW>` where `<YOUR_SECRET_TOKEN>` is the same secret you defined in the `.env.local` file and `<SLUG_TO_PREVIEW>` is the slug of one of the posts you want to preview.
......
...@@ -164,7 +164,7 @@ Then set each variable on `.env.local` using the keys `Project settings` > `API ...@@ -164,7 +164,7 @@ Then set each variable on `.env.local` using the keys `Project settings` > `API
- `KONTENT_PROJECT_ID` - Should be the Project ID in `Project settings` > `API keys`. - `KONTENT_PROJECT_ID` - Should be the Project ID in `Project settings` > `API keys`.
- `KONTENT_PREVIEW_API_KEY` - One of the Preview API keys in `Project settings` > `API keys`. - `KONTENT_PREVIEW_API_KEY` - One of the Preview API keys in `Project settings` > `API keys`.
- `KONTENT_PREVIEW_SECRET` - Can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode). - `KONTENT_PREVIEW_SECRET` - Can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode).
### **4. Run Next.js in development mode** ### **4. Run Next.js in development mode**
......
...@@ -5,7 +5,7 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas ...@@ -5,7 +5,7 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
You'll get: You'll get:
- Statically generated pages from your visual designs - Statically generated pages from your visual designs
- Development server on [preview mode](https://nextjs.org/docs/advanced-features/preview-mode) watches for changes from Plasmic Studio - Development server on [preview mode](https://nextjs.org/docs/pages/guides/preview-mode) watches for changes from Plasmic Studio
## Demo ## Demo
...@@ -91,7 +91,7 @@ Then set each variable on `.env.local`: ...@@ -91,7 +91,7 @@ Then set each variable on `.env.local`:
- `NEXT_PUBLIC_PLASMIC_PROJECT_ID` should be the `projectId` value in step 2. - `NEXT_PUBLIC_PLASMIC_PROJECT_ID` should be the `projectId` value in step 2.
- `NEXT_PUBLIC_PLASMIC_PROJECT_API_TOKEN` should be the API token gathered in previous step. - `NEXT_PUBLIC_PLASMIC_PROJECT_API_TOKEN` should be the API token gathered in previous step.
- `PLASMIC_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode). - `PLASMIC_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode).
### Step 4. Run Next.js in development mode ### Step 4. Run Next.js in development mode
......
...@@ -59,7 +59,7 @@ Copy the _GraphQL Production_ access token and paste it as the `PREPRIO_PRODUCTI ...@@ -59,7 +59,7 @@ Copy the _GraphQL Production_ access token and paste it as the `PREPRIO_PRODUCTI
Alternatively, you can create access tokens yourself by clicking **Add access token**. If so, make sure to [choose the right GraphQL permissions](https://docs.prepr.io/reference/graphql/v1/authorization) for the access tokens. Alternatively, you can create access tokens yourself by clicking **Add access token**. If so, make sure to [choose the right GraphQL permissions](https://docs.prepr.io/reference/graphql/v1/authorization) for the access tokens.
**2.3** Set a custom value with no spaces as the `PREPRIO_PREVIEW_SECRET` variable, for example, a UUID. This value will be used to enable [preview mode](https://nextjs.org/docs/advanced-features/preview-mode). **2.3** Set a custom value with no spaces as the `PREPRIO_PREVIEW_SECRET` variable, for example, a UUID. This value will be used to enable [preview mode](https://nextjs.org/docs/pages/guides/preview-mode).
Once done, your `.env.local` file should look like this: Once done, your `.env.local` file should look like this:
......
...@@ -140,7 +140,7 @@ cp .env.local.example .env.local ...@@ -140,7 +140,7 @@ cp .env.local.example .env.local
Then set each variable on `.env.local`: Then set each variable on `.env.local`:
- `STORYBLOK_API_KEY` should be the API key you just copied. - `STORYBLOK_API_KEY` should be the API key you just copied.
- `STORYBLOK_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [the Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode). - `STORYBLOK_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [the Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode).
### Step 9. Configure Image Optimization ### Step 9. Configure Image Optimization
...@@ -189,7 +189,7 @@ Your blog should be up and running on [http://localhost:3000](http://localhost:3 ...@@ -189,7 +189,7 @@ Your blog should be up and running on [http://localhost:3000](http://localhost:3
To try preview mode, create another post like before (you can try duplicating), but **do not publish it - just save it**: To try preview mode, create another post like before (you can try duplicating), but **do not publish it - just save it**:
Now, if you go to the post page on localhost, you won't see this post because it’s not published. However, if you use the **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/advanced-features/preview-mode)). Now, if you go to the post page on localhost, you won't see this post because it’s not published. However, if you use the **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/pages/guides/preview-mode)).
To enable the Preview Mode, go to this URL: To enable the Preview Mode, go to this URL:
......
...@@ -134,7 +134,7 @@ Then set each variable on `.env.local`: ...@@ -134,7 +134,7 @@ Then set each variable on `.env.local`:
- `TAKESHAPE_API_KEY` should be the API token you just copied. - `TAKESHAPE_API_KEY` should be the API token you just copied.
- `TAKESHAPE_PROJECT_ID` should be the project ID, which is a substring in the project page URL: `https://app.takeshape.io/projects/<project-id>/...` - `TAKESHAPE_PROJECT_ID` should be the project ID, which is a substring in the project page URL: `https://app.takeshape.io/projects/<project-id>/...`
- `TAKESHAPE_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [the Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode). - `TAKESHAPE_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [the Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode).
Your `.env.local` file should look like this: Your `.env.local` file should look like this:
...@@ -162,7 +162,7 @@ Your blog should be up and running on [http://localhost:3000](http://localhost:3 ...@@ -162,7 +162,7 @@ Your blog should be up and running on [http://localhost:3000](http://localhost:3
On TakeShape, create a new post like before. But **DO NOT** click **Enabled** under **Workflow Status**. On TakeShape, create a new post like before. But **DO NOT** click **Enabled** under **Workflow Status**.
Now, if you go to `http://localhost:3000/posts/<slug>` (replace `<slug>`), you won’t see the post. However, if you use the **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/advanced-features/preview-mode)). Now, if you go to `http://localhost:3000/posts/<slug>` (replace `<slug>`), you won’t see the post. However, if you use the **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/pages/guides/preview-mode)).
To enable the Preview Mode, go to this URL: To enable the Preview Mode, go to this URL:
......
...@@ -88,7 +88,7 @@ Then set each variable in `.env.local`: ...@@ -88,7 +88,7 @@ Then set each variable in `.env.local`:
- `UMBRACO_PROJECT_ALIAS`: Set it to the project alias, which can be found under **Settings** -> **Headless**. - `UMBRACO_PROJECT_ALIAS`: Set it to the project alias, which can be found under **Settings** -> **Headless**.
- `UMBRACO_API_KEY`: Create a new API Key under **Users > "Your Username" > API Keys**. - `UMBRACO_API_KEY`: Create a new API Key under **Users > "Your Username" > API Keys**.
- `UMBRACO_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode). - `UMBRACO_PREVIEW_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode).
Your `.env.local` file should look like this: Your `.env.local` file should look like this:
...@@ -119,7 +119,7 @@ Then click save and go back to the **Content** section, click on _Posts_ and the ...@@ -119,7 +119,7 @@ Then click save and go back to the **Content** section, click on _Posts_ and the
- **Update the title**. For example, you can add `[Draft]` in front of the title. - **Update the title**. For example, you can add `[Draft]` in front of the title.
- Click **Save**, but **DO NOT** click **Publish**. By doing this, the post will be in the draft state. - Click **Save**, but **DO NOT** click **Publish**. By doing this, the post will be in the draft state.
Now, if you go to the post page on localhost, you won't see the updated title. However, if you use **Preview Mode**, you'll be able to see the change ([Documentation](/docs/advanced-features/preview-mode.md)). Now, if you go to the post page on localhost, you won't see the updated title. However, if you use **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/pages/guides/preview-mode)).
To enable the Preview Mode, go to this URL: To enable the Preview Mode, go to this URL:
......
...@@ -145,7 +145,7 @@ Your blog should be up and running on [http://localhost:3000](http://localhost:3 ...@@ -145,7 +145,7 @@ Your blog should be up and running on [http://localhost:3000](http://localhost:3
### Step 8. Try Preview Mode ### Step 8. Try Preview Mode
If you edit a post in Umbraco without publishing the changes, you won't see these changes at `http://localhost:3000` by default. However, if you enable **Preview Mode**, you'll be able to see the changes ([Documentation](https://nextjs.org/docs/advanced-features/preview-mode)). If you edit a post in Umbraco without publishing the changes, you won't see these changes at `http://localhost:3000` by default. However, if you enable **Preview Mode**, you'll be able to see the changes ([Documentation](https://nextjs.org/docs/pages/guides/preview-mode)).
To enable Preview Mode, go to this URL: To enable Preview Mode, go to this URL:
......
...@@ -87,7 +87,7 @@ You will be able to use the same API token for both published and draft posts. ...@@ -87,7 +87,7 @@ You will be able to use the same API token for both published and draft posts.
Copy the `.env.local.example` file to `.env.local`, then set the variables as follows: Copy the `.env.local.example` file to `.env.local`, then set the variables as follows:
- `PREVIEW_API_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode). - `PREVIEW_API_SECRET` can be any random string (but avoid spaces), like `MY_SECRET` - this is used for [Preview Mode](https://nextjs.org/docs/pages/guides/preview-mode).
- WEBINY_API_SECRET this will be your security token generated in Webiny - WEBINY_API_SECRET this will be your security token generated in Webiny
- You can find the values for `NEXT_PUBLIC_WEBINY_API_URL` and `NEXT_PUBLIC_WEBINY_PREVIEW_API_URL` two ways: From your local Webiny project root, run `yarn webiny info`, alternatively go to **API Playground** in the sidebar. At the top of the GraphQL explorer are four tabs, one for each of our APIs, and you'll see both the Read API and the Preview API on those tabs. The URL for your environment is just below the tab. ([More info here if you get stuck](https://www.webiny.com/docs/headless-cms/basics/graphql-api)) - You can find the values for `NEXT_PUBLIC_WEBINY_API_URL` and `NEXT_PUBLIC_WEBINY_PREVIEW_API_URL` two ways: From your local Webiny project root, run `yarn webiny info`, alternatively go to **API Playground** in the sidebar. At the top of the GraphQL explorer are four tabs, one for each of our APIs, and you'll see both the Read API and the Preview API on those tabs. The URL for your environment is just below the tab. ([More info here if you get stuck](https://www.webiny.com/docs/headless-cms/basics/graphql-api))
...@@ -111,7 +111,7 @@ The best place to debug is inside the `fetchAPI` function in `lib/api.js`. If yo ...@@ -111,7 +111,7 @@ The best place to debug is inside the `fetchAPI` function in `lib/api.js`. If yo
### Step 4. Try preview mode ### Step 4. Try preview mode
If you go to the `/posts/draft` page on localhost, you won't see this post because it’s not published. However, if you use the **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/advanced-features/preview-mode)). If you go to the `/posts/draft` page on localhost, you won't see this post because it’s not published. However, if you use the **Preview Mode**, you'll be able to see the change ([Documentation](https://nextjs.org/docs/pages/guides/preview-mode)).
To enable the Preview Mode, go to this URL: To enable the Preview Mode, go to this URL:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment