feat: implement SEO-friendly URLs for Bible reader
- Add dynamic route structure /[locale]/bible/[version]/[book]/[chapter] - Convert UUID-based URLs to readable format (e.g., /en/bible/eng-kjv/genesis/1) - Implement automatic redirects from old URLs to new SEO-friendly format - Add SEO metadata generation with proper titles, descriptions, and OpenGraph tags - Create API endpoint for URL conversion between formats - Update navigation in search results, bookmarks, and internal links - Fix PWA manifest icons to correct dimensions (192x192, 512x512) - Resolve JavaScript parameter passing issues between server and client components - Maintain backward compatibility with existing bookmark and search functionality Benefits: - Improved SEO with descriptive URLs - Better user experience with readable URLs - Enhanced social media sharing - Maintained full backward compatibility
This commit is contained in:
@@ -409,7 +409,9 @@ export default function SearchContent() {
|
||||
navigator.clipboard.writeText(text)
|
||||
}, [])
|
||||
|
||||
const handleNavigateToVerse = useCallback((result: SearchResult) => {
|
||||
const handleNavigateToVerse = useCallback(async (result: SearchResult) => {
|
||||
// For now, use the fallback URL format since we don't have version info in SearchResult
|
||||
// TODO: Enhance SearchResult to include version information for SEO-friendly URLs
|
||||
const bookIdentifier = result.bookId || result.bookKey || result.book
|
||||
router.push(`/${locale}/bible?book=${bookIdentifier}&chapter=${result.chapter}&verse=${result.verse}`)
|
||||
}, [router, locale])
|
||||
|
||||
Reference in New Issue
Block a user