feat: working SPA

This commit is contained in:
2026-04-24 18:25:27 +02:00
parent e89020ad96
commit cbab7c74e5
13 changed files with 166 additions and 14 deletions
+10 -3
View File
@@ -1,8 +1,15 @@
import { createRouter, createWebHistory } from 'vue-router'
import ArticleView from '@views/ArticleView.vue'
import HomeView from '@views/HomeView.vue'
import NotFoundView from '@views/NotFoundView.vue'
import { createRouter, createWebHashHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [],
history: createWebHashHistory(),
routes: [
{ path: '/', component: HomeView },
{ path: '/articles/:year(\\d{4})/:month(\\d{2})/:day(\\d{2})', component: ArticleView },
{ path: '/:pathMatch(.*)', component: NotFoundView },
],
})
export default router