fix: use VitePress withBase in NavCard for correct routing

NavCard component now uses VitePress's withBase() utility function
to properly handle base path in all environments:
- Local development: /easy-vibe/
- GitHub Pages: /easy-vibe/
- Vercel: /

This fixes 404 errors when clicking NavCard links in appendix pages.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
sanbuphy
2026-02-20 02:10:25 +08:00
parent c4c494cbac
commit 0e8618f902
+3 -1
View File
@@ -1,4 +1,6 @@
<script setup> <script setup>
import { withBase } from 'vitepress'
defineProps({ defineProps({
href: { href: {
type: String, type: String,
@@ -21,7 +23,7 @@ defineProps({
<template> <template>
<a <a
:href="href" :href="withBase(href)"
class="nav-card-link" class="nav-card-link"
> >
<div class="nav-card"> <div class="nav-card">