From 1fc939b711c81b2eb060ba5e89b89e2edcf9f682 Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Wed, 30 Sep 2026 19:02:57 +0700 Subject: [PATCH] fix(web): serve from ytgenerator.stream root and retire the GitHub Pages deploy The Worker connected to ytgenerator.stream was serving a build made for the GitHub Pages sub-path: index.html asked for /youtube-generator/assets/*.js, the SPA fallback answered every one of those with index.html, and the site loaded blank. Both builds are now served from `/`. - vite.config.ts: base "/" for web and Tauri alike. - wrangler.jsonc: the one Cloudflare file in the repo. Assets-only for now (dist/, SPA fallback, custom domain declared so `wrangler deploy` never detaches it, workers.dev off, build.command runs `npm run build`). - public/_headers: CSP, nosniff, Referrer-Policy, Permissions-Policy, COOP, X-Frame-Options; immutable caching for hashed /assets/*. No HSTS - the zone edge already sends it with preload. - index.html, manifest, robots, sitemap: canonical/OG/JSON-LD on the new domain, pt-BR and id added to the locale metadata, Android listed. - Brand: one SVG source in assets/brand/ now drives the favicon, the PWA icons (192/512/maskable), apple-touch-icon, a 1200x630 link-preview card and every Tauri desktop/Android/iOS icon. The desktop and Android apps had been shipping a flat indigo placeholder square; manifest and index.html pointed at four PNGs that did not exist. `npm run generate:brand` re-renders the web images; the Android adaptive icon gets a glyph-only foreground on the brand colour instead of a tile on a white disc. - deploy-web.yml and notify-deploy.yml removed, .nojekyll dropped. The last Pages deployment stays online untouched until the data-migration page replaces it. - .node-version pins Node 22 for Workers Builds; wrangler, @tauri-apps/cli and @resvg/resvg-js are pinned dev dependencies (`npm run cf:dev`, `npm run cf:check` for a dry-run deploy). Co-Authored-By: Claude Opus 5.5 --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 +- .github/workflows/deploy-web.yml | 31 - .github/workflows/notify-deploy.yml | 18 - .gitignore | 6 + .node-version | 1 + assets/brand/logo-foreground.svg | 11 + assets/brand/logo-maskable.svg | 16 + assets/brand/logo.svg | 12 + assets/brand/og-image.svg | 33 + index.html | 37 +- knip.json | 14 +- package-lock.json | 1499 ++++++++++++++++- package.json | 10 +- public/.nojekyll | 0 public/_headers | 30 + public/apple-touch-icon.png | Bin 0 -> 11920 bytes public/favicon.ico | Bin 0 -> 18117 bytes public/favicon.svg | 15 +- public/icons/icon-192.png | Bin 0 -> 12926 bytes public/icons/icon-512.png | Bin 0 -> 48997 bytes public/icons/maskable-512.png | Bin 0 -> 39046 bytes public/manifest.webmanifest | 25 +- public/og-image.png | Bin 0 -> 182540 bytes public/robots.txt | 3 +- public/sitemap.xml | 2 +- scripts/generate-brand-assets.ts | 97 ++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 3524 -> 3266 bytes .../mipmap-hdpi/ic_launcher_foreground.png | Bin 14102 -> 1272 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 3524 -> 2585 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 3377 -> 2097 bytes .../mipmap-mdpi/ic_launcher_foreground.png | Bin 9081 -> 840 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 3377 -> 1712 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 7971 -> 4349 bytes .../mipmap-xhdpi/ic_launcher_foreground.png | Bin 18900 -> 1797 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 7971 -> 3417 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 12392 -> 6986 bytes .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin 29506 -> 2785 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 12392 -> 5120 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 16751 -> 8931 bytes .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin 40510 -> 3863 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 16751 -> 6626 bytes .../res/values/ic_launcher_background.xml | 4 + src-tauri/icons/128x128.png | Bin 299 -> 3640 bytes src-tauri/icons/128x128@2x.png | Bin 665 -> 7378 bytes src-tauri/icons/32x32.png | Bin 106 -> 955 bytes src-tauri/icons/64x64.png | Bin 160 -> 1833 bytes src-tauri/icons/Square107x107Logo.png | Bin 240 -> 3117 bytes src-tauri/icons/Square142x142Logo.png | Bin 329 -> 3998 bytes src-tauri/icons/Square150x150Logo.png | Bin 348 -> 4134 bytes src-tauri/icons/Square284x284Logo.png | Bin 763 -> 8165 bytes src-tauri/icons/Square30x30Logo.png | Bin 105 -> 889 bytes src-tauri/icons/Square310x310Logo.png | Bin 853 -> 9294 bytes src-tauri/icons/Square44x44Logo.png | Bin 121 -> 1246 bytes src-tauri/icons/Square71x71Logo.png | Bin 172 -> 2059 bytes src-tauri/icons/Square89x89Logo.png | Bin 200 -> 2495 bytes src-tauri/icons/StoreLogo.png | Bin 130 -> 1436 bytes .../icons/android/mipmap-hdpi/ic_launcher.png | Bin 173 -> 3266 bytes .../mipmap-hdpi/ic_launcher_foreground.png | Bin 375 -> 1272 bytes .../android/mipmap-hdpi/ic_launcher_round.png | Bin 249 -> 2585 bytes .../icons/android/mipmap-mdpi/ic_launcher.png | Bin 173 -> 2097 bytes .../mipmap-mdpi/ic_launcher_foreground.png | Bin 240 -> 840 bytes .../android/mipmap-mdpi/ic_launcher_round.png | Bin 242 -> 1712 bytes .../android/mipmap-xhdpi/ic_launcher.png | Bin 276 -> 4349 bytes .../mipmap-xhdpi/ic_launcher_foreground.png | Bin 515 -> 1797 bytes .../mipmap-xhdpi/ic_launcher_round.png | Bin 420 -> 3417 bytes .../android/mipmap-xxhdpi/ic_launcher.png | Bin 429 -> 6986 bytes .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin 902 -> 2785 bytes .../mipmap-xxhdpi/ic_launcher_round.png | Bin 679 -> 5120 bytes .../android/mipmap-xxxhdpi/ic_launcher.png | Bin 571 -> 8931 bytes .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin 1356 -> 3863 bytes .../mipmap-xxxhdpi/ic_launcher_round.png | Bin 909 -> 6626 bytes .../android/values/ic_launcher_background.xml | 4 +- src-tauri/icons/icon.icns | Bin 12666 -> 105135 bytes src-tauri/icons/icon.ico | Bin 1959 -> 18117 bytes src-tauri/icons/icon.png | Bin 1816 -> 16868 bytes src-tauri/icons/ios/AppIcon-20x20@1x.png | Bin 91 -> 584 bytes src-tauri/icons/ios/AppIcon-20x20@2x-1.png | Bin 116 -> 1164 bytes src-tauri/icons/ios/AppIcon-20x20@2x.png | Bin 116 -> 1164 bytes src-tauri/icons/ios/AppIcon-20x20@3x.png | Bin 147 -> 1807 bytes src-tauri/icons/ios/AppIcon-29x29@1x.png | Bin 104 -> 843 bytes src-tauri/icons/ios/AppIcon-29x29@2x-1.png | Bin 142 -> 1706 bytes src-tauri/icons/ios/AppIcon-29x29@2x.png | Bin 142 -> 1706 bytes src-tauri/icons/ios/AppIcon-29x29@3x.png | Bin 195 -> 2592 bytes src-tauri/icons/ios/AppIcon-40x40@1x.png | Bin 116 -> 1164 bytes src-tauri/icons/ios/AppIcon-40x40@2x-1.png | Bin 185 -> 2425 bytes src-tauri/icons/ios/AppIcon-40x40@2x.png | Bin 185 -> 2425 bytes src-tauri/icons/ios/AppIcon-40x40@3x.png | Bin 263 -> 3556 bytes src-tauri/icons/ios/AppIcon-512@2x.png | Bin 5695 -> 46388 bytes src-tauri/icons/ios/AppIcon-60x60@2x.png | Bin 263 -> 3556 bytes src-tauri/icons/ios/AppIcon-60x60@3x.png | Bin 419 -> 5219 bytes src-tauri/icons/ios/AppIcon-76x76@1x.png | Bin 179 -> 1990 bytes src-tauri/icons/ios/AppIcon-76x76@2x.png | Bin 352 -> 3812 bytes src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png | Bin 388 -> 4781 bytes vite.config.ts | 10 +- wrangler.jsonc | 30 + 96 files changed, 1822 insertions(+), 94 deletions(-) delete mode 100644 .github/workflows/deploy-web.yml delete mode 100644 .github/workflows/notify-deploy.yml create mode 100644 .node-version create mode 100644 assets/brand/logo-foreground.svg create mode 100644 assets/brand/logo-maskable.svg create mode 100644 assets/brand/logo.svg create mode 100644 assets/brand/og-image.svg delete mode 100644 public/.nojekyll create mode 100644 public/_headers create mode 100644 public/apple-touch-icon.png create mode 100644 public/favicon.ico create mode 100644 public/icons/icon-192.png create mode 100644 public/icons/icon-512.png create mode 100644 public/icons/maskable-512.png create mode 100644 public/og-image.png create mode 100644 scripts/generate-brand-assets.ts create mode 100644 src-tauri/gen/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 src-tauri/gen/android/app/src/main/res/values/ic_launcher_background.xml create mode 100644 wrangler.jsonc diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 94fb863..d989e59 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -21,10 +21,11 @@ body: attributes: label: Where are you running YTDescGen? options: - - Web (GitHub Pages) + - Web (ytgenerator.stream) - Desktop — Windows (Tauri) - Desktop — macOS (Tauri) - Desktop — Linux (Tauri) + - Android (APK) - Local dev (npm run dev) validations: required: true diff --git a/.github/workflows/deploy-web.yml b/.github/workflows/deploy-web.yml deleted file mode 100644 index b776b78..0000000 --- a/.github/workflows/deploy-web.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Deploy to GitHub Pages - -on: - push: - branches: [main] - -permissions: - contents: read - pages: write - id-token: write - -jobs: - deploy: - runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - uses: actions/checkout@v7 - - uses: actions/setup-node@v7 - with: - node-version: 22 - cache: npm - - run: npm ci - - run: npm run build - - uses: actions/configure-pages@v6 - - uses: actions/upload-pages-artifact@v5 - with: - path: dist - - id: deployment - uses: actions/deploy-pages@v5 diff --git a/.github/workflows/notify-deploy.yml b/.github/workflows/notify-deploy.yml deleted file mode 100644 index e16c3bc..0000000 --- a/.github/workflows/notify-deploy.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Notify Deploy Status - -on: - workflow_run: - # Match the exact `name:` of the deploy workflow - # (.github/workflows/deploy-web.yml). Renaming it silently breaks this - # filter — keep them in sync. - workflows: ["Deploy to GitHub Pages"] - types: [completed] - -permissions: - contents: read - actions: read - -jobs: - notify: - uses: poli0981/.github/.github/workflows/notify-deploy.yml@main - secrets: inherit diff --git a/.gitignore b/.gitignore index 5c06071..61ce198 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,9 @@ src-tauri/gen/android/.gradle/ src-tauri/gen/android/.idea/ src-tauri/gen/android/build/ src-tauri/gen/android/app/build/ + +# Cloudflare (wrangler dev / dry runs) +.wrangler/ +.dev.vars +.dev.vars.* +!.dev.vars.example diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +22 diff --git a/assets/brand/logo-foreground.svg b/assets/brand/logo-foreground.svg new file mode 100644 index 0000000..b2314ce --- /dev/null +++ b/assets/brand/logo-foreground.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/assets/brand/logo-maskable.svg b/assets/brand/logo-maskable.svg new file mode 100644 index 0000000..1279cf6 --- /dev/null +++ b/assets/brand/logo-maskable.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/assets/brand/logo.svg b/assets/brand/logo.svg new file mode 100644 index 0000000..e366e77 --- /dev/null +++ b/assets/brand/logo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assets/brand/og-image.svg b/assets/brand/og-image.svg new file mode 100644 index 0000000..15844bf --- /dev/null +++ b/assets/brand/og-image.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + YTDescGen + Titles, descriptions & tags for gameplay videos + 8 languages · Web · Windows · macOS · Linux · Android + ytgenerator.stream + + diff --git a/index.html b/index.html index 132b498..50c56af 100644 --- a/index.html +++ b/index.html @@ -2,37 +2,40 @@ - + - + YTDescGen — YouTube Title, Description & Tag Generator for Gameplay Channels - - + + - - - - - + + + + + - - + + + + + @@ -40,7 +43,7 @@ - +