diff --git a/minify-build.js b/minify-build.js index 8e0ad07..219e7c4 100644 --- a/minify-build.js +++ b/minify-build.js @@ -156,13 +156,8 @@ async function createOptimizedBuild() { // 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) { - await fs.copyFile( - path.join('public/assets', asset), - path.join('dist/assets', asset) - ); - } + await copyDirectoryRecursive('public/assets', 'dist/assets'); + console.log(' ✅ Assets directory copied recursively'); } catch (err) { console.log(' No assets directory found, skipping...'); } @@ -296,6 +291,27 @@ async function bundleAndMinifyJS() { } } +async function copyDirectoryRecursive(src, dest) { + // Create destination directory if it doesn't exist + await fs.mkdir(dest, { recursive: true }); + + // Read all items in source directory + const entries = await fs.readdir(src, { withFileTypes: true }); + + for (const entry of entries) { + const srcPath = path.join(src, entry.name); + const destPath = path.join(dest, entry.name); + + if (entry.isDirectory()) { + // Recursively copy subdirectories + await copyDirectoryRecursive(srcPath, destPath); + } else { + // Copy files + await fs.copyFile(srcPath, destPath); + } + } +} + async function minifyHTMLFile(inputPath, outputPath) { const html = await fs.readFile(inputPath, 'utf8'); diff --git a/nginx.conf b/nginx.conf index 41757a0..1247922 100644 --- a/nginx.conf +++ b/nginx.conf @@ -41,6 +41,12 @@ http { add_header X-XSS-Protection "1; mode=block" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; + # Logo assets: 1 hour cache + location ~* ^/assets/logos/ { + expires 1h; + add_header Cache-Control "public, max-age=3600"; + } + # Temporary: Disable caching during development location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { expires 10m; diff --git a/public/assets/logos/bookwyrm-dark.svg b/public/assets/logos/bookwyrm-dark.svg new file mode 100644 index 0000000..abd8125 --- /dev/null +++ b/public/assets/logos/bookwyrm-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/bookwyrm-light.svg b/public/assets/logos/bookwyrm-light.svg new file mode 100644 index 0000000..8ca0e7a --- /dev/null +++ b/public/assets/logos/bookwyrm-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/default-dark.svg b/public/assets/logos/default-dark.svg new file mode 100644 index 0000000..6662ef2 --- /dev/null +++ b/public/assets/logos/default-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/default-light.svg b/public/assets/logos/default-light.svg new file mode 100644 index 0000000..6946ad8 --- /dev/null +++ b/public/assets/logos/default-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/mastodon-dark.svg b/public/assets/logos/mastodon-dark.svg new file mode 100644 index 0000000..ddbe2fb --- /dev/null +++ b/public/assets/logos/mastodon-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/mastodon-light.svg b/public/assets/logos/mastodon-light.svg new file mode 100644 index 0000000..dca7d6c --- /dev/null +++ b/public/assets/logos/mastodon-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/piefed-dark.svg b/public/assets/logos/piefed-dark.svg new file mode 100644 index 0000000..6c3b741 --- /dev/null +++ b/public/assets/logos/piefed-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/piefed-light.svg b/public/assets/logos/piefed-light.svg new file mode 100644 index 0000000..da920f7 --- /dev/null +++ b/public/assets/logos/piefed-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/pixelfed-dark.svg b/public/assets/logos/pixelfed-dark.svg new file mode 100644 index 0000000..e191994 --- /dev/null +++ b/public/assets/logos/pixelfed-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/pixelfed-light.svg b/public/assets/logos/pixelfed-light.svg new file mode 100644 index 0000000..410979a --- /dev/null +++ b/public/assets/logos/pixelfed-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/primary-dark.svg b/public/assets/logos/primary-dark.svg new file mode 100644 index 0000000..c3c4b36 --- /dev/null +++ b/public/assets/logos/primary-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/logos/primary-light.svg b/public/assets/logos/primary-light.svg new file mode 100644 index 0000000..4832327 --- /dev/null +++ b/public/assets/logos/primary-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/index.html b/public/index.html index 29940bc..6ea878a 100644 --- a/public/index.html +++ b/public/index.html @@ -100,8 +100,12 @@ @@ -114,34 +118,92 @@

Here, you are a member, not just a user - We want to create community in this space, being respectful of each other as well as the places we go and the people we see. This space is what we make of it.

+ +
+
+ + + + Otter mascot holding a laptop with the words Keyboard Vagabond circling it + +
+ + Seymour is the official mascot of Keyboard Vagabond and a nomadic otter who always wants to see more! + He makes his home wherever he goes and adapts to his new environments. + Let our adorable friend guide you through the fediverse and give you a break from the + algorithms and attention grabbing of corporate social media. + He was lovingly created by nomad and designer Lori Kendall at branddesigncreate.com, + Instagram at @branddesigncreate. + +
+ +
-

Our Fediverse Services

-

Keyboard Vagabond hosts various fediverse alternatives to big tech and participates in the network. - Available to you are:

-
-

Quick Access to All Services

+

Our Fediverse Services

@@ -246,7 +308,7 @@