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
+8 -44
View File
@@ -7,56 +7,20 @@
</div>
<% } %>
<% if (recentPosts && recentPosts.length> 0) { %>
<% if (recentPosts && recentPosts.length > 0) { %>
<section class="home-recent-posts"
style="margin-top: 5rem; padding-top: 3rem; border-top: 1px solid var(--color-border);">
<div style="display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2rem;">
<h2 style="font-size: 2rem; margin: 0; font-family: var(--font-serif); font-weight: 400;">Recent Posts
</h2>
<div style="display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2.5rem;">
<h2 style="font-size: 2rem; margin: 0; font-family: var(--font-serif); font-weight: 400;">Recent Posts</h2>
<a href="/blogs" class="nav-link" style="font-size: 0.95rem; font-weight: 500;">View all blogs &rarr;</a>
</div>
<div class="home-posts-compact-list">
<% recentPosts.forEach(post=> { %>
<a href="/<%= post.slug %>" class="home-post-compact-item">
<% if (post.cover) { %>
<img src="<%= post.cover %>" alt="<%= post.title %>" class="home-post-thumb" loading="lazy">
<% } else { %>
<div class="home-post-thumb-placeholder">
<span>
<%= post.title.slice(0, 1) %>
</span>
</div>
<% } %>
<div class="home-post-compact-body">
<h3 class="home-post-compact-title">
<%= post.title %>
</h3>
<div class="home-post-compact-meta">
<time datetime="<%= post.date.toISOString() %>">
<%= post.date.toLocaleDateString('en-US', { month: 'short' , day: 'numeric' ,
year: 'numeric' }) %>
</time>
<% if (post.category) { %>
<span class="meta-sep">&bull;</span>
<span>
<%= post.category %>
</span>
<% } %>
<% if (post.availableLanguages && post.availableLanguages.length> 1) { %>
<span class="meta-sep">&bull;</span>
<span class="meta-lang-tag">[<%= post.availableLanguages.map(l=>
l.toUpperCase()).join('|') %>]</span>
<% } %>
</div>
<p class="home-post-compact-excerpt">
<%= post.excerpt %>
</p>
</div>
</a>
<% }) %>
<div class="home-posts-grid-4">
<% recentPosts.forEach(post => { %>
<%- include('../partials/post-card', { post }) %>
<% }) %>
</div>
</section>
<% } %>
<% } %>
</div>
<%- include('../partials/foot', { pageType: 'home' }) %>