diff --git a/minify-build.js b/minify-build.js index 40d06b6..8e0ad07 100644 --- a/minify-build.js +++ b/minify-build.js @@ -36,8 +36,6 @@ async function createOptimizedBuild() { content: [ 'public/index.html', 'public/about.html', - 'public/robots.txt', - 'public/sitemap.xml', ], css: [ 'public/css/pico.jade.css', @@ -155,8 +153,8 @@ async function createOptimizedBuild() { await minifyHTMLFile('public/index.html', 'dist/index.html'); await minifyHTMLFile('public/about.html', 'dist/about.html'); - // Step 5: Copy assets - console.log('📁 Step 5: Copying assets...'); + // Step 5: Copy assets and SEO files + console.log('📁 Step 5: Copying assets and SEO files...'); try { const assets = await fs.readdir('public/assets'); for (const asset of assets) { @@ -169,6 +167,16 @@ async function createOptimizedBuild() { console.log(' No assets directory found, skipping...'); } + // Copy SEO files + try { + await fs.copyFile('public/structured-data.json', 'dist/structured-data.json'); + await fs.copyFile('public/sitemap.xml', 'dist/sitemap.xml'); + await fs.copyFile('public/robots.txt', 'dist/robots.txt'); + console.log(' ✅ SEO files copied (structured-data.json, sitemap.xml, robots.txt)'); + } catch (err) { + console.log(' ⚠️ Some SEO files not found, skipping...'); + } + // Calculate compression results const originalCSSSize = (await fs.stat('public/css/pico.jade.min.css')).size + (await fs.stat('public/css/pico.min.css')).size; diff --git a/public/about.html b/public/about.html index 93265f9..8644937 100644 --- a/public/about.html +++ b/public/about.html @@ -113,7 +113,7 @@ diff --git a/public/index.html b/public/index.html index 1c32cf4..29940bc 100644 --- a/public/index.html +++ b/public/index.html @@ -38,6 +38,18 @@ + + + + + + + + + + + + @@ -48,15 +60,15 @@
-