You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -179,34 +179,34 @@ If the page is a dynamic page, for example `_id.vue`, it won't have enough infor
179
179
180
180
1. Update the _nuxt.config.js_ file so that Nuxt.js uses a list of all available data to generate static pages for each framework/library:
181
181
182
-
```javascript
183
-
import { projects } from "./utils/projectsData";
182
+
```javascript
183
+
import { projects } from "./utils/projectsData";
184
184
185
-
export default {
186
-
mode: "universal",
185
+
export default {
186
+
mode: "universal",
187
187
188
-
//...truncated
188
+
//...truncated
189
189
190
-
generate: {
191
-
async routes() {
192
-
const paths = [];
190
+
generate: {
191
+
async routes() {
192
+
const paths = [];
193
193
194
-
projects.forEach(project => {
195
-
paths.push(`/project/${project.slug}`);
196
-
});
194
+
projects.forEach(project => {
195
+
paths.push(`/project/${project.slug}`);
196
+
});
197
197
198
-
return paths;
199
-
}
200
-
}
201
-
};
202
-
```
198
+
return paths;
199
+
}
200
+
}
201
+
};
202
+
```
203
203
204
-
> [!NOTE]
205
-
>`routes` is an async function, so you can make a request to an API in this functionand use the returned list to generate the paths.
204
+
> [!NOTE]
205
+
>`routes` is an async function, so you can make a request to an API in this functionand use the returned list to generate the paths.
206
206
207
207
2. Push the new changes to your GitHub repository and waitfor a few minutes while GitHub Actions builds your site again. After the build is complete, the 404 error disappears.
208
208
209
-
:::image type="content" source="media/deploy-nuxtjs/404-in-production-fixed.png" alt-text="404 on dynamic routes fixed":::
209
+
:::image type="content" source="media/deploy-nuxtjs/404-in-production-fixed.png" alt-text="404 on dynamic routes fixed":::
0 commit comments