const crypto = require('crypto'); const fs = require('fs'); // 读取原始 HTML const originalHtml = fs.readFileSync('nav-home.html', 'utf8'); // 提取 body 内容(从
到 ) const bodyMatch = originalHtml.match(/]*>([\s\S]*)<\/body>/); const bodyContent = bodyMatch ? bodyMatch[1] : ''; // 提取 style 内容 const styleMatch = originalHtml.match(/