From 04ab476d9bf5fe591ec8c52ec315c11d94ee62d6 Mon Sep 17 00:00:00 2001 From: eggy Date: Wed, 10 Aug 2022 18:47:39 -0400 Subject: [PATCH] feat: add 404 page --- layouts/error.vue | 13 ++++++++++++- nuxt.config.ts | 3 +++ pages/[...slug].vue | 4 ++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/layouts/error.vue b/layouts/error.vue index c54ac3a..1b9944b 100644 --- a/layouts/error.vue +++ b/layouts/error.vue @@ -1 +1,12 @@ - + + + diff --git a/nuxt.config.ts b/nuxt.config.ts index 7f0b527..8c94d72 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -19,6 +19,9 @@ export default defineNuxtConfig({ sitemap: { hostname: process.env.BASE_URL || "https://eggworld.tk", }, + generate: { + fallback: "404.html", + }, tailwindcss: {}, colorMode: { classSuffix: "", diff --git a/pages/[...slug].vue b/pages/[...slug].vue index 3448814..fd9a4da 100644 --- a/pages/[...slug].vue +++ b/pages/[...slug].vue @@ -49,6 +49,10 @@ const captionText =