This commit is contained in:
parent
9d0a823351
commit
d74495ddef
936 changed files with 80 additions and 69 deletions
|
|
@ -2,7 +2,7 @@ import fs from "node:fs";
|
|||
import path from "node:path";
|
||||
|
||||
const repoRoot = process.cwd();
|
||||
const websiteRoot = path.join(repoRoot, "website");
|
||||
const legacyHtmlRoot = path.join(repoRoot, "archive-source");
|
||||
|
||||
function walkHtml(dir) {
|
||||
return fs.readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
|
||||
|
|
@ -26,7 +26,7 @@ function removeWordPressResidue(html) {
|
|||
|
||||
let updated = 0;
|
||||
|
||||
for (const filePath of walkHtml(websiteRoot)) {
|
||||
for (const filePath of walkHtml(legacyHtmlRoot)) {
|
||||
const original = fs.readFileSync(filePath, "utf8");
|
||||
const cleaned = removeWordPressResidue(original);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue