Welcome to my website!
Check out my home page here: https://i.sstatic.net/znfq0.jpg
If you're interested in reading my blog, visit the blog page here: https://i.sstatic.net/oiYSY.png
I've built this site using vue3. Here's a snippet of the code:
import { createRouter, createWebHashHistory } from 'vue-router';
import Home from '../views/Home.vue';
import Blogs from '../views/Blogs.vue';
const routes = [
{ path: '/', component: Home},
{ path: '/home', name: 'Home', component: Home },
{ path: '/blogs', name: 'Blogs', component: Blogs },
];
const router = createRouter({
history: createWebHashHistory(),
routes
})
export default router;
However, I encountered an issue with the routing. When I try to access the 'http://localhost:3000/blogs/' link, it redirects me to the home page instead of the blog page.
To fix this, I discovered that the link should be 'http://localhost:3000/#/blogs' for proper routing to the blog page. Check out the corrected link here: https://i.sstatic.net/1vFwE.png
It's a bit confusing why I have to include '/#/' before the actual path in the URL, but it resolves the routing issue.