23 lines
743 B
JavaScript
Vendored
23 lines
743 B
JavaScript
Vendored
const VueRouter = require('vue-router');
|
|
|
|
import Home from './views/Home.vue';
|
|
import Blog from './views/Blog.vue';
|
|
import BlogArticle from './views/BlogArticle.vue';
|
|
import Snippets from './views/Snippets.vue';
|
|
import Contact from './views/Contact.vue';
|
|
|
|
const routes = [
|
|
{ path: '/', name: 'index', component: Home },
|
|
{ path: '/blog', name: 'blog', component: Blog },
|
|
{ path: '/blog/:year/:month/:day/:id-:slug', name: 'blog-article', component: BlogArticle, props: true },
|
|
{ path: '/snippets', name: 'snippets', component: Snippets },
|
|
{ path: '/contact', name: 'contact', component: Contact },
|
|
];
|
|
|
|
const router = VueRouter.createRouter({
|
|
history: VueRouter.createWebHistory(),
|
|
routes,
|
|
});
|
|
|
|
export default router
|