chore(spec): 归档 blog-5m——萤火落地收敛

Spec: 2026-11-05_blog-5m-heatmap-fireflies

Co-authored-by: GLM-5.3
This commit is contained in:
wait4xandGLM-5.3 committed 2026-11-05 11:22:26 +08:00
1 parent 44cd62e9a2
commit eead28f3a0
14 files changed
+321 -1411

No files matched your search

+1 -10
View File
@@ -14,13 +14,7 @@ if (MODE === 'skip') {
}
const SKIP_PREFIX = ['/admin/', '/photos-originals/']; // admin=CMS 路由;photos-originals=部署期 rsync 叠加层(不在 dist,另有部署链保障)
// 已知不存在的 en 孪生目标(见 targetExists 内注释)
const KNOWN_MISSING_TWIN = new Set(['/en/heatmap-preview/']);
const SKIP_FILE = new Set([
'/404.html', // Astro 404 页不参与配对
// 一次性预览路由(预览-选型-落地模式):只有 zh 版,配对检查豁免;选定后随路由一起删
'/heatmap-preview/index.html',
]);
const SKIP_FILE = new Set(['/404.html']); // Astro 404 页不参与配对
@@ -45,9 +39,6 @@ function decodePath(p) {
/** /x/ → dist/x/index.html;/a.svg → dist/a.svg;找不到即 null */
function targetExists(url) {
if (SKIP_PREFIX.some((s) => url.startsWith(s))) return true;
// 一次性预览路由的 en 孪生:语言切换器会给预览页生成 /en/… 链接,而预览只有 zh 版
// (页面本体已在 SKIP_FILE 豁免配对检查;此处豁免切换器链接,选定后随路由一起删)
if (KNOWN_MISSING_TWIN.has(url.split('#')[0].split('?')[0])) return true;
const p = decodePath(url.split('#')[0].split('?')[0]);
if (!p || p === '/') return existsSync(join(DIST, 'index.html'));
if (p.endsWith('/')) return existsSync(join(DIST, p, 'index.html'));