Files
sisvietnamvn_01/sisvietnamvn/fix_about_links.js
T
2026-06-01 16:45:26 +07:00

15 lines
719 B
JavaScript

const fs = require('fs');
const path = 'd:\\website_sisvietnam_moi\\website_sisvietnam.vn\\sisvietnamvn\\src\\main\\resources\\templates\\about.html';
let content = fs.readFileSync(path, 'utf8');
// Replace UMass Undergraduate specific files with the ones from the main UMass Amherst folder if we want, or just leave it.
// But since the folder was created while bootRun is active, let's use a gradle command to process resources.
// However, fixing the image links is important.
content = content.replace(/\/sites\/default\/files\/styles\/[^"'\s]+/gi, '/images/LogoSIS.svg');
// Also fix manifest 404
content = content.replace(/<link rel="manifest" href="[^"]+">/gi, '');
fs.writeFileSync(path, content, 'utf8');