New Logo
Updated cache system now 15/30mins but scope updates every minute
Font update
This commit is contained in:
fraxle
2026-06-04 14:07:34 +01:00
parent efc9b0eed9
commit ede875f0d0
100 changed files with 231 additions and 106 deletions
+17 -4
View File
@@ -171,14 +171,27 @@ async function build() {
}
}
// 6. Copy fonts
// 6. Copy fonts - explicit allowlist keeps only what is referenced in CSS.
// All variants remain in assets/fonts/ as source files.
const FONT_ALLOWLIST = new Set([
'manrope-variable.woff2',
'fraunces-300-italic.woff2',
'fraunces-700-normal.woff2',
'fraunces-700-italic.woff2',
'fraunces-900-normal.woff2',
'jetbrains-mono-400.woff2',
'jetbrains-mono-600.woff2',
]);
console.log(' Copying fonts...');
const fontsDir = path.join(ROOT, 'assets', 'fonts');
if (fs.existsSync(fontsDir)) {
let copied = 0;
for (const f of fs.readdirSync(fontsDir)) {
copyFile(path.join(fontsDir, f), path.join(DIST, 'fonts', f));
if (!FONT_ALLOWLIST.has(f)) continue;
copyFile(path.join(fontsDir, f), path.join(DIST, 'assets', 'fonts', f));
copied++;
}
console.log(' -> fonts/ (' + fs.readdirSync(fontsDir).length + ' files)');
console.log(' -> assets/fonts/ (' + copied + ' of ' + fs.readdirSync(fontsDir).length + ' files)');
}
// 7. Copy images
@@ -201,7 +214,7 @@ async function build() {
// 8. Copy static files
console.log(' Copying static files...');
for (const f of ['robots.txt', 'sitemap.xml', 'og-image.png']) {
for (const f of ['robots.txt', 'sitemap.xml', 'og-image.png', 'favicon.svg']) {
const src = path.join(ROOT, f);
if (fs.existsSync(src)) {
copyFile(src, path.join(DIST, f));