Commit Graph

8 Commits

Author SHA1 Message Date
912c70332e Fix tag URL encoding for non-ASCII characters
Fixed tag matching issue where tags with spaces and non-ASCII characters (like "Medicine - 醫學") were not working correctly on Vercel.

Changes:
1. Updated getTagSlug() to normalize tags without encoding - Next.js handles URL encoding automatically
2. Added decodeURIComponent() in tag page to decode incoming URL parameters
3. This ensures proper matching between generated slugs and URL parameters

The fix resolves:
- Tag archive pages showing wrong characters
- Articles not being collected under correct tags
- URL display issues with encoded characters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 23:20:04 +08:00
5d3d754252 Fix tag URL encoding for non-ASCII characters
Updated getTagSlug() to properly encode tags with spaces and non-ASCII characters (like Chinese). The function now:
- Normalizes multiple spaces/dashes to single dashes
- Properly encodes non-ASCII characters using encodeURIComponent
- Prevents issues with URL encoding on Vercel deployment

This fixes tags like "Medicine - 醫學" being displayed as "medicine---%E9%86%AB%E5%AD%B8" by generating clean URLs like "medicine-%E9%86%AB%E5%AD%B8".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 23:10:34 +08:00
4c08413936 Migrate to Contentlayer2 2025-11-19 21:46:49 +08:00
96ebca37d6 Add storyline navigation rail for posts 2025-11-18 16:45:46 +08:00
4b3329d66f Add related posts section and blog search 2025-11-18 16:43:52 +08:00
bede4a2f3e Stabilize tag URLs using slugs instead of raw tag text 2025-11-17 18:48:50 +08:00
3253e70a37 Add tag cloud to right sidebar 2025-11-17 18:38:08 +08:00
0c64279e34 Initial commit 2025-11-17 15:28:20 +08:00