Skip to content

Commit a4f9c66

Browse files
authored
Indentation corrections
1 parent a66f139 commit a4f9c66

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

articles/static-web-apps/deploy-nextjs.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ The following steps show how to link the app you just pushed to GitHub to Azure
138138
1. In the *Region* drop-down, choose a region closest to you.
139139
1. Select **Free** from the SKU drop-down.
140140
141-
:::image type="content" source="media/deploy-nextjs/create-static-web-app.png" alt-text="Create Static Web App":::
141+
:::image type="content" source="media/deploy-nextjs/create-static-web-app.png" alt-text="Create Static Web App":::
142142
143143
### Add a GitHub repository
144144
@@ -149,15 +149,15 @@ The new Static Web Apps account needs access to the repository with your Next.js
149149
1. Find and select the name of the repository you created earlier.
150150
1. Choose **master** as the branch from the *Branch* drop-down.
151151
152-
:::image type="content" source="media/deploy-nextjs/connect-github.png" alt-text="Connect GitHub":::
152+
:::image type="content" source="media/deploy-nextjs/connect-github.png" alt-text="Connect GitHub":::
153153
154154
### Configure the build process
155155
156156
Azure Static Web Apps is built to automatically carry out common tasks like installing npm modules and running `npm run build` during each deployment. There are, however, a few settings like the application source folder and the build destination folder that you need to configure manually.
157157
158158
1. Click on the **Build** tab to configure the static output folder.
159159
160-
:::image type="content" source="media/deploy-nextjs/build-tab.png" alt-text="Build tab":::
160+
:::image type="content" source="media/deploy-nextjs/build-tab.png" alt-text="Build tab":::
161161
162162
2. Type **out** in the *App artifact location* text box.
163163
@@ -195,35 +195,35 @@ The reason for this error is because Next.js only generated the home page based
195195
196196
1. Update the _next.config.js_ file so that Next.js uses a list of all available data to generate static pages for each framework/library:
197197
198-
```javascript
199-
const data = require('./utils/projectsData');
198+
```javascript
199+
const data = require('./utils/projectsData');
200200
201-
module.exports = {
202-
exportTrailingSlash: true,
203-
exportPathMap: async function () {
204-
const { projects } = data;
205-
const paths = {
206-
'/': { page: '/' },
207-
};
201+
module.exports = {
202+
exportTrailingSlash: true,
203+
exportPathMap: async function () {
204+
const { projects } = data;
205+
const paths = {
206+
'/': { page: '/' },
207+
};
208208
209-
projects.forEach((project) => {
210-
paths[`/project/${project.slug}`] = {
211-
page: '/project/[path]',
212-
query: { path: project.slug },
213-
};
214-
});
209+
projects.forEach((project) => {
210+
paths[`/project/${project.slug}`] = {
211+
page: '/project/[path]',
212+
query: { path: project.slug },
213+
};
214+
});
215215
216-
return paths;
217-
},
218-
};
219-
```
216+
return paths;
217+
},
218+
};
219+
```
220220
221-
> [!NOTE]
222-
> The `exportPathMap` function is an async function, so you can make a request to an API in this function and use the returned list to generate the paths.
221+
> [!NOTE]
222+
> The `exportPathMap` function is an async function, so you can make a request to an API in this function and use the returned list to generate the paths.
223223
224224
2. Push the new changes to your GitHub repository and wait for a few minutes while GitHub Actions builds your site again. After the build is complete, the 404 error disappears.
225225
226-
:::image type="content" source="media/deploy-nextjs/404-in-production-fixed.png" alt-text="404 on dynamic routes fixed":::
226+
:::image type="content" source="media/deploy-nextjs/404-in-production-fixed.png" alt-text="404 on dynamic routes fixed":::
227227
228228
> [!div class="nextstepaction"]
229229
> [Set up a custom domain](custom-domain.md)

0 commit comments

Comments
 (0)