From 7106afacb9ac99f13aa28b213445007aeefbb05f Mon Sep 17 00:00:00 2001 From: Gabriel Cozma Date: Mon, 5 Aug 2024 17:19:34 +0300 Subject: [PATCH] feat: add 404 page (#114) --- src/router/index.ts | 6 ++++++ src/views/NotFoundView.vue | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/views/NotFoundView.vue 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 @@ +