From e0572f44710f7c42de8c7cd710170be586e776ef Mon Sep 17 00:00:00 2001 From: Michael DiLeo Date: Mon, 29 Sep 2025 18:57:15 +0000 Subject: [PATCH] fix-typo (#18) add SEO adjustments, apply html segments Reviewed-on: http://source.michaeldileo.org/michael_dileo/Keyboard-Vagabond-Web/pulls/18 Co-authored-by: Michael DiLeo Co-committed-by: Michael DiLeo --- minify-build.js | 16 ++- public/about.html | 2 +- public/index.html | 57 +++++++---- public/site-styles/style.css | 73 ++++++++++++++ public/sitemap.xml | 43 +++++++- public/structured-data.json | 187 +++++++++++++++++++++++++---------- 6 files changed, 296 insertions(+), 82 deletions(-) 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 @@
-