feat(migration): complete WordPress migration and UX refinements

- Migrate historical posts, localized assets, and 103 comments
- Colocate media into posts/<slug>/images/ and remove wp-content
- Add native bilingual support for ai-can-change post (English default, /zh variant)
- Support clean taxonomy routing (/category/:category and /tag/:tag)
- Dynamically populate categories and tags in sitemap.xml
- Fix header scroll padding/margin offsets for anchor and reference links
- Constrain image and media widths to prevent content overflow
- Redesign homepage recent posts to 4 compact editorial cards
- Restore valid binary favicon.ico and high-res icon assets
- Remove placeholder content and sample test comments
This commit is contained in:
2026-09-16 23:09:09 -07:00
parent 8c0b04db0e
commit f52b3fe9e4
87 changed files with 3417 additions and 190 deletions
+22
View File
@@ -59,6 +59,28 @@ router.get('/sitemap.xml', (req, res) => {
}
}
// Taxonomy archive pages (Categories & Tags)
const taxonomy = contentService.getTaxonomy();
if (taxonomy.categories && taxonomy.categories.length > 0) {
for (const cat of taxonomy.categories) {
xml += ' <url>\n';
xml += ` <loc>${siteUrl}/category/${encodeURIComponent(cat.name)}</loc>\n`;
xml += ` <changefreq>weekly</changefreq>\n`;
xml += ` <priority>0.6</priority>\n`;
xml += ' </url>\n';
}
}
if (taxonomy.tags && taxonomy.tags.length > 0) {
for (const tag of taxonomy.tags) {
xml += ' <url>\n';
xml += ` <loc>${siteUrl}/tag/${encodeURIComponent(tag.name)}</loc>\n`;
xml += ` <changefreq>weekly</changefreq>\n`;
xml += ` <priority>0.5</priority>\n`;
xml += ' </url>\n';
}
}
xml += '</urlset>';
res.header('Content-Type', 'application/xml; charset=utf-8');