From a1a24daf3fe765aac2e989ee13b8d30e8ab9667d Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Sun, 11 Jan 2026 15:31:29 -0800 Subject: [PATCH] Add cheatsheet tip to downloads section and fix Vercel 404 - Add download tip with cheatsheet link in downloads section - Fix cheatsheet 404 on Vercel by adding rewrite rule - Include cheatsheet.html in Bun build entrypoints Co-Authored-By: Claude Opus 4.5 --- public/css/main.css | 15 +++++++++++++++ public/index.html | 1 + scripts/build.js | 7 +++++-- vercel.json | 5 ++++- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/public/css/main.css b/public/css/main.css index dd115eeeb..01a60569b 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -2322,6 +2322,21 @@ code { border-radius: 4px; } +.download-tip { + font-size: 0.8125rem; + color: var(--color-ash); + margin-top: var(--spacing-sm); +} + +.download-tip a { + color: var(--color-accent); + text-decoration: none; +} + +.download-tip a:hover { + text-decoration: underline; +} + /* ============================================ SUPPORT SECTION ============================================ */ diff --git a/public/index.html b/public/index.html index 34b309c76..cbb22bb1c 100644 --- a/public/index.html +++ b/public/index.html @@ -320,6 +320,7 @@ Prefix commands with /i- to avoid conflicts +

Once installed, keep our command cheatsheet handy for quick reference.

diff --git a/scripts/build.js b/scripts/build.js index c5d0df269..819c81d71 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -73,14 +73,17 @@ function buildTailwindCSS() { * CSS is pre-compiled by Tailwind CLI, then bundled with HTML/JS */ async function buildStaticSite() { - const entrypoint = path.join(ROOT_DIR, 'public', 'index.html'); + const entrypoints = [ + path.join(ROOT_DIR, 'public', 'index.html'), + path.join(ROOT_DIR, 'public', 'cheatsheet.html'), + ]; const outdir = path.join(ROOT_DIR, 'build'); console.log('📦 Building static site with Bun...'); try { const result = await Bun.build({ - entrypoints: [entrypoint], + entrypoints: entrypoints, outdir: outdir, minify: true, sourcemap: 'linked', diff --git a/vercel.json b/vercel.json index 5f70fff6c..0810af773 100644 --- a/vercel.json +++ b/vercel.json @@ -6,6 +6,9 @@ "api/**/*.js": { "includeFiles": "source/**,dist/**" } - } + }, + "rewrites": [ + { "source": "/cheatsheet", "destination": "/cheatsheet.html" } + ] }