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:
@@ -10,7 +10,7 @@
|
||||
<span class="meta-sep">—</span>
|
||||
<span>by <%= post.author %></span>
|
||||
<% if (post.category) { %>
|
||||
<span>in <a href="/blogs?category=<%= encodeURIComponent(post.category) %>" class="meta-category-link"><%= post.category %></a></span>
|
||||
<span>in <a href="/category/<%= encodeURIComponent(post.category) %>" class="meta-category-link"><%= post.category %></a></span>
|
||||
<% } %>
|
||||
|
||||
<!-- Inline Bilingual Language Switcher with stable line height -->
|
||||
@@ -20,7 +20,7 @@
|
||||
<span style="opacity: 0.7;">🌐</span>
|
||||
<% post.availableLanguages.forEach(l => {
|
||||
const isCurrent = (currentLang === l);
|
||||
const targetUrl = (l === post.defaultLang || (l === 'en' && post.isDefault))
|
||||
const targetUrl = (l === post.defaultLang || (post.isDefault && l === post.lang))
|
||||
? `/${post.slug}`
|
||||
: `/${post.slug}/${l}`;
|
||||
const displayLabel = l === 'zh' ? '中文' : (l === 'en' ? 'English' : l.toUpperCase());
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="post-tags-container">
|
||||
<span class="post-tags-label">Tags:</span>
|
||||
<% post.tags.forEach(tag => { %>
|
||||
<a href="/blogs?tag=<%= encodeURIComponent(tag.toLowerCase()) %>" class="tag-link">
|
||||
<a href="/tag/<%= encodeURIComponent(tag.toLowerCase()) %>" class="tag-link">
|
||||
#<%= tag %>
|
||||
</a>
|
||||
<% }) %>
|
||||
|
||||
Reference in New Issue
Block a user