Fix fonts and reduce number loaded
Add fonts to build.js
This commit is contained in:
Fraxle
2026-05-27 08:19:59 +01:00
parent 0c8cb1ba37
commit 2c0cac5094
5 changed files with 12 additions and 4 deletions
+11 -1
View File
@@ -171,7 +171,17 @@ async function build() {
}
}
// 6. Copy static files
// 6. Copy fonts
console.log(' Copying fonts...');
const fontsDir = path.join(ROOT, 'assets', 'fonts');
if (fs.existsSync(fontsDir)) {
for (const f of fs.readdirSync(fontsDir)) {
copyFile(path.join(fontsDir, f), path.join(DIST, 'fonts', f));
}
console.log(' -> fonts/ (' + fs.readdirSync(fontsDir).length + ' files)');
}
// 7. Copy static files
console.log(' Copying static files...');
for (const f of ['robots.txt', 'sitemap.xml', 'og-image.png']) {
const src = path.join(ROOT, f);