fix: preserve deployment paths across environments - #166
Conversation
🤖 Codex-Style Code Review by OpenCode
Let me gather some context on the PR Review: Hash-based routing support for GitHub Pages deploymentOverviewThis PR refactors the app to properly support deployment on GitHub Pages with hash-based routing. The core change is moving from hardcoded 🔴 Blocking1. const isProjectPage =
window.location.hostname.endsWith('.github.io') && parts[0] === 'plweb2'Two issues:
Fix: Derive the base path from 🟡 Important2. The 3. The redirect appends the existing `${basePath}#${routePath}${window.location.search}${window.location.hash}`If the 404 page was reached via a URL that already had a fragment (e.g., 🟢 Nitpicks / Suggestions4. The removed CSS was unused since the component doesn't have a 5. Both views now set :style="{ backgroundImage: `url(${getPath('/@base/assets/messages/Message-Default.png')})` }"This duplicates the URL string across files. Consider exposing a shared CSS variable or a computed CSS class from a composable to keep it DRY. Alternatively, define a CSS class with a CSS custom property and set it via inline style: .loading {
background-image: var(--loading-bg);
}✅ What's good
Summary
The PR is well-structured and clearly motivated. The blocking issue (fragile GitHub Pages detection in |
No description provided.