From 4055090031c316fb0a9769e0364e2b93e206b222 Mon Sep 17 00:00:00 2001 From: Juri Jatschmenow Date: Wed, 21 Jan 2026 16:08:40 +0100 Subject: [PATCH 1/2] remove unnecessary icons, fix asset version, fix mobile cut off --- esbuild.config.js | 2 ++ scripts/build-html.js | 4 +++- src/config.js | 4 ++-- src/data/agenda.js | 2 -- src/index.html | 16 ++++++++-------- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/esbuild.config.js b/esbuild.config.js index fa935fd..5eea774 100644 --- a/esbuild.config.js +++ b/esbuild.config.js @@ -2,6 +2,7 @@ import * as esbuild from "esbuild"; const isProduction = process.env.NODE_ENV === "production"; const isWatch = process.argv.includes("--watch"); +const assetVersion = new Date().toISOString().slice(0, 10).replace(/-/g, ''); const config = { entryPoints: ["src/main.js"], @@ -18,6 +19,7 @@ const config = { isProduction ? "production" : "development", ), "import.meta.env.BASE_PATH": JSON.stringify(process.env.BASE_PATH || ""), + "import.meta.env.ASSET_VERSION": JSON.stringify(assetVersion), }, }; diff --git a/scripts/build-html.js b/scripts/build-html.js index bd3ec1b..7e47aea 100644 --- a/scripts/build-html.js +++ b/scripts/build-html.js @@ -1,6 +1,7 @@ import { readFileSync, writeFileSync, mkdirSync } from 'fs'; const baseUrl = process.env.BASE_URL || 'https://conference.openapis.org'; +const assetVersion = new Date().toISOString().slice(0, 10).replace(/-/g, ''); // Ensure dist directory exists mkdirSync('dist', { recursive: true }); @@ -8,6 +9,7 @@ mkdirSync('dist', { recursive: true }); // Read, replace, and write let html = readFileSync('src/index.html', 'utf-8'); html = html.replace(/__BASE_URL__/g, baseUrl); +html = html.replace(/__ASSET_VERSION__/g, assetVersion); writeFileSync('dist/index.html', html); -console.log(`✅ HTML built with BASE_URL=${baseUrl}`); +console.log(`✅ HTML built with BASE_URL=${baseUrl}, ASSET_VERSION=${assetVersion}`); diff --git a/src/config.js b/src/config.js index 7082b5f..d953323 100644 --- a/src/config.js +++ b/src/config.js @@ -4,8 +4,8 @@ * Provides base path handling for assets */ -// Asset version for cache busting - increment when deploying changes -const ASSET_VERSION = Date.now(); +// Asset version for cache busting - set to current date during build (YYYYMMDD format) +const ASSET_VERSION = import.meta.env.ASSET_VERSION || Date.now(); // BASE_PATH kept for backwards compatibility if used elsewhere const BASE_PATH = import.meta.env.BASE_PATH || ""; diff --git a/src/data/agenda.js b/src/data/agenda.js index aa650ba..204c0f4 100644 --- a/src/data/agenda.js +++ b/src/data/agenda.js @@ -20,7 +20,6 @@ export const agendaSections = [ description: "Join 600+ developers building new apps, bots — in person or online. Participants can build any app of their choice and will compete for $12,500+ in cash, products and prizes. Put yourself in the center of the developer world!", speakers: [], - icon: asset("/images/hackathon.svg"), disableHover: true, }, { @@ -244,7 +243,6 @@ export const agendaSections = [ description: "Official DeveloperWeek Closing Ceremony. Join us for closing remarks and a celebration of the day's achievements.", speakers: [], - icon: asset("/images/closing.svg"), disableHover: true, }, ], diff --git a/src/index.html b/src/index.html index 6f29b5b..3cf53be 100644 --- a/src/index.html +++ b/src/index.html @@ -51,7 +51,7 @@ /> - + @@ -81,7 +81,7 @@ /> - + @@ -100,7 +100,7 @@
OpenAPI Conference Logo @@ -135,7 +135,7 @@ rel="noopener noreferrer" > Developer Week Logo @@ -196,7 +196,7 @@ rel="noopener noreferrer" class="tablet:hidden p-4 relative h-[152px] -mt-6 rounded-b-4xl overflow-hidden bg-cover bg-center block cursor-pointer" style=" - background-image: url("./images/background/background_top_right_san_jose.jpg?v=2"); + background-image: url("./images/background/background_top_right_san_jose.jpg?v=__ASSET_VERSION__"); " > @@ -303,7 +303,7 @@
@@ -540,7 +540,7 @@
- +