diff --git a/src/router/index.ts b/src/router/index.ts index 40be737..d17c6dc 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from "vue-router"; import HomeView from "../views/HomeView.vue"; import ArticleView from "../views/ArticleView.vue"; import CollectionView from "../views/CollectionView.vue"; +import NotFoundView from "../views/NotFoundView.vue"; import { useHead } from 'unhead' @@ -23,6 +24,11 @@ const router = createRouter({ name: "article", component: ArticleView, }, + { + path: "/:pathMatch(.*)*", + name: "notfound", + component: NotFoundView, + } ], }); diff --git a/src/views/NotFoundView.vue b/src/views/NotFoundView.vue new file mode 100644 index 0000000..599119f --- /dev/null +++ b/src/views/NotFoundView.vue @@ -0,0 +1,13 @@ +