Merge pull request #167 from poli0981/feat/cloudflare-hosting

fix(web): serve ytgenerator.stream from the root, retire the GitHub Pages deploy
This commit is contained in:
poli0981 authored and GitHub committed 2026-09-30 19:24:32 +07:00
commit c6e43f8e13
96 files changed
+1822 -94

No files matched your search

+2 -1
View File
@@ -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
-31
View File
@@ -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
-18
View File
@@ -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
+6
View File
@@ -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
+1
View File
@@ -0,0 +1 @@
22
+11
View File
@@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<!-- Android adaptive-icon foreground: glyph only, transparent canvas. The
launcher masks a 108dp layer down to a ~66dp circle, so the artwork is
scaled to keep its bounding-box diagonal inside that safe zone. The
background layer is the flat brand colour in ic_launcher_background.xml. -->
<g transform="translate(256 256) scale(.72) translate(-256 -252)">
<path d="M176 118c0-17.9 19.4-29.1 34.9-20.1l128.2 74c15.5 9 15.5 31.2 0 40.2l-128.2 74C195.4 295.1 176 283.9 176 266z" fill="#fff"/>
<rect x="136" y="322" width="240" height="32" rx="16" fill="#fff" fill-opacity=".92"/>
<rect x="136" y="374" width="160" height="32" rx="16" fill="#fff" fill-opacity=".6"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 779 B

+16
View File
@@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<defs>
<linearGradient id="ytg-bg" x1="0" y1="0" x2="512" y2="512" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6366F1"/>
<stop offset="1" stop-color="#A855F7"/>
</linearGradient>
</defs>
<!-- Full-bleed: the platform applies its own mask. Artwork sits inside the
80% safe zone (a 0.72 scale about the centre keeps every corner in). -->
<rect width="512" height="512" fill="url(#ytg-bg)"/>
<g transform="translate(256 256) scale(.72) translate(-256 -251)">
<path d="M176 118c0-17.9 19.4-29.1 34.9-20.1l128.2 74c15.5 9 15.5 31.2 0 40.2l-128.2 74C195.4 295.1 176 283.9 176 266z" fill="#fff"/>
<rect x="136" y="322" width="240" height="32" rx="16" fill="#fff" fill-opacity=".92"/>
<rect x="136" y="374" width="160" height="32" rx="16" fill="#fff" fill-opacity=".6"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 907 B

+12
View File
@@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<defs>
<linearGradient id="ytg-bg" x1="40" y1="24" x2="472" y2="488" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6366F1"/>
<stop offset="1" stop-color="#A855F7"/>
</linearGradient>
</defs>
<rect width="512" height="512" rx="120" fill="url(#ytg-bg)"/>
<path d="M176 118c0-17.9 19.4-29.1 34.9-20.1l128.2 74c15.5 9 15.5 31.2 0 40.2l-128.2 74C195.4 295.1 176 283.9 176 266z" fill="#fff"/>
<rect x="136" y="322" width="240" height="32" rx="16" fill="#fff" fill-opacity=".92"/>
<rect x="136" y="374" width="160" height="32" rx="16" fill="#fff" fill-opacity=".6"/>
</svg>

After

Width:  |  Height:  |  Size: 678 B

+33
View File
@@ -0,0 +1,33 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630">
<defs>
<linearGradient id="ytg-bg" x1="40" y1="24" x2="472" y2="488" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6366F1"/>
<stop offset="1" stop-color="#A855F7"/>
</linearGradient>
<radialGradient id="glow-a" cx="1040" cy="40" r="620" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#7C3AED" stop-opacity=".42"/>
<stop offset="1" stop-color="#7C3AED" stop-opacity="0"/>
</radialGradient>
<radialGradient id="glow-b" cx="120" cy="640" r="520" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#4F46E5" stop-opacity=".30"/>
<stop offset="1" stop-color="#4F46E5" stop-opacity="0"/>
</radialGradient>
</defs>
<rect width="1200" height="630" fill="#0B0B12"/>
<rect width="1200" height="630" fill="url(#glow-a)"/>
<rect width="1200" height="630" fill="url(#glow-b)"/>
<g transform="translate(96 179) scale(.53125)">
<rect width="512" height="512" rx="120" fill="url(#ytg-bg)"/>
<path d="M176 118c0-17.9 19.4-29.1 34.9-20.1l128.2 74c15.5 9 15.5 31.2 0 40.2l-128.2 74C195.4 295.1 176 283.9 176 266z" fill="#fff"/>
<rect x="136" y="322" width="240" height="32" rx="16" fill="#fff" fill-opacity=".92"/>
<rect x="136" y="374" width="160" height="32" rx="16" fill="#fff" fill-opacity=".6"/>
</g>
<g font-family="Segoe UI, Inter, Helvetica Neue, Arial, sans-serif">
<text x="410" y="268" font-size="92" font-weight="700" fill="#F4F4F8" letter-spacing="-1.5">YTDescGen</text>
<text x="412" y="334" font-size="34" fill="#B4B4C6">Titles, descriptions &amp; tags for gameplay videos</text>
<text x="412" y="384" font-size="28" fill="#8E8EA6">8 languages · Web · Windows · macOS · Linux · Android</text>
<text x="412" y="452" font-size="30" font-weight="600" fill="#A5A6FB">ytgenerator.stream</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

+20 -17
View File
@@ -2,37 +2,40 @@
<html lang="en" class="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="color-scheme" content="dark light" />
<meta name="theme-color" content="#0a0a0a" />
<meta name="theme-color" content="#0b0b12" />
<title>YTDescGen — YouTube Title, Description & Tag Generator for Gameplay Channels</title>
<meta name="description" content="Generate YouTube titles, descriptions, and tags for Gameplay No Commentary channels — multilingual templates, profile presets, and a Tauri-based desktop build." />
<meta name="keywords" content="youtube, gameplay, no commentary, description generator, tags generator, video title, vietnamese, japanese, korean, spanish, chinese, multilingual, tauri, desktop" />
<meta name="description" content="Generate YouTube titles, descriptions, and tags for Gameplay No Commentary channels — eight languages, reusable profiles and presets, on the web or as a desktop and Android app." />
<meta name="keywords" content="youtube, gameplay, no commentary, description generator, tags generator, video title, vietnamese, japanese, korean, spanish, chinese, portuguese, indonesian, multilingual, desktop, android" />
<meta name="author" content="SkullMute (poli0981)" />
<meta name="robots" content="index, follow" />
<meta name="generator" content="Vite + React" />
<link rel="canonical" href="https://poli0981.github.io/youtube-generator/" />
<link rel="icon" type="image/svg+xml" href="/youtube-generator/favicon.svg" />
<link rel="apple-touch-icon" href="/youtube-generator/apple-touch-icon.png" />
<link rel="manifest" href="/youtube-generator/manifest.webmanifest" />
<link rel="canonical" href="https://ytgenerator.stream/" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" sizes="16x16 32x32 48x48" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.webmanifest" />
<!-- OpenGraph -->
<meta property="og:type" content="website" />
<meta property="og:site_name" content="YTDescGen" />
<meta property="og:title" content="YTDescGen — YouTube Title, Description & Tag Generator" />
<meta property="og:description" content="Multilingual title, description, and tag generator for Gameplay No Commentary channels." />
<meta property="og:url" content="https://poli0981.github.io/youtube-generator/" />
<meta property="og:image" content="https://poli0981.github.io/youtube-generator/og-image.png" />
<meta property="og:url" content="https://ytgenerator.stream/" />
<meta property="og:image" content="https://ytgenerator.stream/og-image.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="YTDescGen — titles, descriptions and tags for gameplay videos" />
<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="vi_VN" />
<meta property="og:locale:alternate" content="ja_JP" />
<meta property="og:locale:alternate" content="es_ES" />
<meta property="og:locale:alternate" content="ko_KR" />
<meta property="og:locale:alternate" content="zh_CN" />
<meta property="og:locale:alternate" content="pt_BR" />
<meta property="og:locale:alternate" content="id_ID" />
<!-- Twitter / X card -->
<meta name="twitter:card" content="summary_large_image" />
@@ -40,7 +43,7 @@
<meta name="twitter:creator" content="@SkullMute0011" />
<meta name="twitter:title" content="YTDescGen — YouTube Title, Description & Tag Generator" />
<meta name="twitter:description" content="Multilingual title, description, and tag generator for Gameplay No Commentary channels." />
<meta name="twitter:image" content="https://poli0981.github.io/youtube-generator/og-image.png" />
<meta name="twitter:image" content="https://ytgenerator.stream/og-image.png" />
<!-- Structured data -->
<script type="application/ld+json">
@@ -49,11 +52,11 @@
"@type": "WebApplication",
"name": "YTDescGen",
"alternateName": "YouTube Description Generator",
"url": "https://poli0981.github.io/youtube-generator/",
"url": "https://ytgenerator.stream/",
"applicationCategory": "MultimediaApplication",
"operatingSystem": "Web, Windows, macOS, Linux",
"description": "Generate YouTube titles, descriptions, and tags for Gameplay No Commentary channels — multilingual templates, profile presets, and a Tauri-based desktop build.",
"inLanguage": ["en", "vi", "ja", "es", "ko", "zh"],
"operatingSystem": "Web, Windows, macOS, Linux, Android",
"description": "Generate YouTube titles, descriptions, and tags for Gameplay No Commentary channels — eight languages, reusable profiles and presets, on the web or as a desktop and Android app.",
"inLanguage": ["en", "vi", "ja", "es", "ko", "zh", "pt-BR", "id"],
"offers": {
"@type": "Offer",
"price": "0",
@@ -62,7 +65,7 @@
"author": {
"@type": "Person",
"name": "SkullMute",
"url": "https://github.com/poli0981"
"url": "https://poli0981.dev/"
},
"license": "https://github.com/poli0981/youtube-generator/blob/main/LICENSE"
}
+10 -4
View File
@@ -1,7 +1,14 @@
{
"$schema": "https://unpkg.com/knip@6/schema.json",
"entry": ["scripts/*.ts", "tests/**/*.test.ts"],
"project": ["src/**/*.{ts,tsx}", "scripts/**/*.ts", "tests/**/*.ts"],
"entry": [
"scripts/*.ts",
"tests/**/*.test.ts"
],
"project": [
"src/**/*.{ts,tsx}",
"scripts/**/*.ts",
"tests/**/*.ts"
],
"ignoreExportsUsedInFile": true,
"ignoreDependencies": [
"@tauri-apps/plugin-fs",
@@ -9,6 +16,5 @@
"tailwindcss",
"@testing-library/jest-dom",
"@testing-library/react"
],
"ignoreBinaries": ["tauri"]
]
}
+1498 -1
View File
File diff suppressed because it is too large. Load diff
+8 -2
View File
@@ -23,7 +23,10 @@
"generate:locale": "tsx scripts/generate-locale-template.ts",
"tauri": "tauri",
"tauri:dev": "tauri dev",
"tauri:build": "tauri build"
"tauri:build": "tauri build",
"generate:brand": "tsx scripts/generate-brand-assets.ts",
"cf:dev": "wrangler dev",
"cf:check": "wrangler deploy --dry-run --outdir .wrangler/dry-run"
},
"dependencies": {
"@tauri-apps/api": "^2.11.1",
@@ -44,7 +47,9 @@
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@resvg/resvg-js": "2.6.2",
"@tailwindcss/postcss": "^4.3.3",
"@tauri-apps/cli": "2.12.0",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.2",
"@types/node": "^26.2.0",
@@ -63,6 +68,7 @@
"typescript": "^5.5.0",
"typescript-eslint": "^8.67.0",
"vite": "^8.2.1",
"vitest": "^4.1.10"
"vitest": "^4.1.10",
"wrangler": "4.144.0"
}
}
View File
Whitespace-only changes.
+30
View File
@@ -0,0 +1,30 @@
# Response headers for files Cloudflare serves straight out of dist/.
#
# Rules are additive: a path matching several blocks gets every header, and a
# header set twice is joined with a comma — so each header name appears in
# exactly one block per path. HSTS is intentionally absent: the zone edge
# already sends `max-age=31536000; includeSubDomains; preload`.
/*
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: accelerometer=(), camera=(), display-capture=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), usb=(), browsing-topics=()
Cross-Origin-Opener-Policy: same-origin
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self'; script-src 'self' https://static.cloudflareinsights.com; connect-src 'self' https://cloudflareinsights.com; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; manifest-src 'self'; worker-src 'self'; object-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests
# Content-hashed build output: safe to cache forever.
/assets/*
Cache-Control: public, max-age=31536000, immutable
Cross-Origin-Resource-Policy: same-origin
/icons/*
Cache-Control: public, max-age=604800
# Link-preview crawlers and chat apps embed this from other origins.
/og-image.png
Cache-Control: public, max-age=86400
Cross-Origin-Resource-Policy: cross-origin
/manifest.webmanifest
Content-Type: application/manifest+json; charset=utf-8
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

+11 -4
View File
@@ -1,5 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
<rect width="64" height="64" rx="12" fill="#0a0a0a"/>
<rect x="14" y="14" width="36" height="36" rx="6" fill="none" stroke="#ec4899" stroke-width="3"/>
<path d="M22 22h20M22 30h20M22 38h12" stroke="#ec4899" stroke-width="3" stroke-linecap="round"/>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<defs>
<linearGradient id="ytg-bg" x1="40" y1="24" x2="472" y2="488" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6366F1"/>
<stop offset="1" stop-color="#A855F7"/>
</linearGradient>
</defs>
<rect width="512" height="512" rx="120" fill="url(#ytg-bg)"/>
<path d="M176 118c0-17.9 19.4-29.1 34.9-20.1l128.2 74c15.5 9 15.5 31.2 0 40.2l-128.2 74C195.4 295.1 176 283.9 176 266z" fill="#fff"/>
<rect x="136" y="322" width="240" height="32" rx="16" fill="#fff" fill-opacity=".92"/>
<rect x="136" y="374" width="160" height="32" rx="16" fill="#fff" fill-opacity=".6"/>
</svg>

Before

Width:  |  Height:  |  Size: 335 B

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

+16 -9
View File
@@ -1,32 +1,39 @@
{
"id": "/",
"name": "YTDescGen",
"short_name": "YTDescGen",
"description": "YouTube title, description, and tag generator for Gameplay No Commentary channels.",
"start_url": "/youtube-generator/",
"scope": "/youtube-generator/",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#0a0a0a",
"theme_color": "#0a0a0a",
"background_color": "#0b0b12",
"theme_color": "#0b0b12",
"lang": "en",
"categories": ["productivity", "utilities", "multimedia"],
"icons": [
{
"src": "favicon.svg",
"src": "/favicon.svg",
"sizes": "any",
"type": "image/svg+xml",
"purpose": "any"
},
{
"src": "icon-192.png",
"src": "/icons/icon-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
"purpose": "any"
},
{
"src": "icon-512.png",
"src": "/icons/icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
"purpose": "any"
},
{
"src": "/icons/maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

+2 -1
View File
@@ -1,3 +1,4 @@
User-agent: *
Allow: /
Sitemap: https://poli0981.github.io/youtube-generator/sitemap.xml
Sitemap: https://ytgenerator.stream/sitemap.xml
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://poli0981.github.io/youtube-generator/</loc>
<loc>https://ytgenerator.stream/</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
+97
View File
@@ -0,0 +1,97 @@
/**
* Rasterise the brand SVGs in `assets/brand/` into the web's static images.
*
* One source for every surface: the same `logo.svg` also feeds the Tauri
* desktop + Android icons (`npx tauri icon assets/brand/logo.svg`), so the
* favicon, the PWA icons, the link-preview card and the installed app can no
* longer drift apart the way the pink favicon and the flat indigo square did
* before v1.0.0.
*
* Run via `npm run generate:brand`. The PNGs are committed; this only needs
* re-running when an SVG in `assets/brand/` changes. Text in the OG card is
* laid out with the machine's fonts (Segoe UI on Windows), so regenerate on a
* machine that has a sans-serif covering Latin — the output is checked in, not
* rebuilt in CI.
*/
import { copyFileSync, mkdirSync, readFileSync, writeFileSync } from "fs";
import { dirname, resolve } from "path";
import { Resvg } from "@resvg/resvg-js";
const ROOT = resolve(import.meta.dirname, "..");
const BRAND = resolve(ROOT, "assets/brand");
const PUBLIC = resolve(ROOT, "public");
interface Target {
source: string;
out: string;
/** Output width in px; height follows the SVG's aspect ratio. */
width: number;
}
const TARGETS: readonly Target[] = [
{ source: "logo.svg", out: "apple-touch-icon.png", width: 180 },
{ source: "logo.svg", out: "icons/icon-192.png", width: 192 },
{ source: "logo.svg", out: "icons/icon-512.png", width: 512 },
{ source: "logo-maskable.svg", out: "icons/maskable-512.png", width: 512 },
{ source: "og-image.svg", out: "og-image.png", width: 1200 },
];
function render({ source, out, width }: Target): void {
const svg = readFileSync(resolve(BRAND, source), "utf8");
const png = new Resvg(svg, {
fitTo: { mode: "width", value: width },
font: { loadSystemFonts: true, defaultFontFamily: "Segoe UI" },
})
.render()
.asPng();
const target = resolve(PUBLIC, out);
mkdirSync(dirname(target), { recursive: true });
writeFileSync(target, png);
console.log(` ${out.padEnd(24)} ${width}px ${(png.length / 1024).toFixed(1)} KB`);
}
console.log("Rendering brand assets → public/");
for (const target of TARGETS) render(target);
// The favicon ships as the SVG itself — crisp at every size, one request.
copyFileSync(resolve(BRAND, "logo.svg"), resolve(PUBLIC, "favicon.svg"));
console.log(" favicon.svg (copied)");
// Legacy `/favicon.ico` requests (browsers still probe it) get the multi-size
// ICO that `tauri icon` generates from the same logo.
copyFileSync(resolve(ROOT, "src-tauri/icons/icon.ico"), resolve(PUBLIC, "favicon.ico"));
console.log(" favicon.ico (from src-tauri/icons/icon.ico)");
// Android adaptive icon. `tauri icon` pads the whole rounded-square logo onto
// a white background layer, which reads as a purple tile on a white disc in
// the launcher. Replace its foreground with the bare glyph and give the
// background layer the brand colour, in both the generated Gradle project and
// the `icons/android` copy `tauri android init` would restore from.
const ANDROID_BACKGROUND = "#8561F4"; // midpoint of the #6366F1 → #A855F7 logo gradient
const FOREGROUND_SIZES: Readonly<Record<string, number>> = {
"mipmap-mdpi": 108,
"mipmap-hdpi": 162,
"mipmap-xhdpi": 216,
"mipmap-xxhdpi": 324,
"mipmap-xxxhdpi": 432,
};
const ANDROID_RES_DIRS = [
resolve(ROOT, "src-tauri/gen/android/app/src/main/res"),
resolve(ROOT, "src-tauri/icons/android"),
];
const foregroundSvg = readFileSync(resolve(BRAND, "logo-foreground.svg"), "utf8");
for (const resDir of ANDROID_RES_DIRS) {
for (const [bucket, size] of Object.entries(FOREGROUND_SIZES)) {
const png = new Resvg(foregroundSvg, { fitTo: { mode: "width", value: size } })
.render()
.asPng();
mkdirSync(resolve(resDir, bucket), { recursive: true });
writeFileSync(resolve(resDir, bucket, "ic_launcher_foreground.png"), png);
}
mkdirSync(resolve(resDir, "values"), { recursive: true });
writeFileSync(
resolve(resDir, "values/ic_launcher_background.xml"),
`<?xml version="1.0" encoding="utf-8"?>\n<resources>\n <color name="ic_launcher_background">${ANDROID_BACKGROUND}</color>\n</resources>\n`,
);
}
console.log(` android adaptive icon glyph foreground + ${ANDROID_BACKGROUND} background`);
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@color/ic_launcher_background"/>
</adaptive-icon>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#8561F4</color>
</resources>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

After

Width:  |  Height:  |  Size: 955 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 763 B

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 853 B

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 902 B

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 679 B

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

After

Width:  |  Height:  |  Size: 6.5 KiB

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#fff</color>
</resources>
<color name="ic_launcher_background">#8561F4</color>
</resources>
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 B

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 B

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 B

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 4.7 KiB

+7 -3
View File
@@ -6,7 +6,11 @@ const isTauri = !!process.env.TAURI_ENV_PLATFORM;
export default defineConfig({
plugins: [react()],
base: isTauri ? "/" : "/youtube-generator/",
// Both builds are served from the root: the web build from
// https://ytgenerator.stream (Cloudflare Workers static assets, see
// wrangler.jsonc) and the Tauri build from its own asset protocol. The old
// GitHub Pages sub-path `/youtube-generator/` is gone as of v1.0.0.
base: "/",
resolve: {
alias: {
"@": path.resolve(import.meta.dirname, "./src"),
@@ -25,8 +29,8 @@ export default defineConfig({
// Chromium (e.g. some emulator system images sit at ~91 until the user
// updates Android System WebView), which chokes on Vite's modern default
// target and renders a blank/black screen. Downlevel the bundle for Tauri
// builds so it runs on those older WebViews; the web (GitHub Pages) build
// keeps Vite's modern default. Desktop WebViews are evergreen, so a lower
// builds so it runs on those older WebViews; the web build keeps Vite's
// modern default. Desktop WebViews are evergreen, so a lower
// target is a harmless no-op there.
target: isTauri ? "es2020" : undefined,
rollupOptions: {
+30
View File
@@ -0,0 +1,30 @@
// Cloudflare Workers configuration for https://ytgenerator.stream.
//
// This is the only deployment file in the repo: Workers Builds (connected to
// this GitHub repository in the Cloudflare dashboard) runs `npx wrangler
// deploy` on every push to `main`, and `build.command` below produces `dist/`.
// There is no GitHub Actions deploy workflow. See docs/HOSTING.md.
{
"$schema": "node_modules/wrangler/config-schema.json",
// Must match the Worker the repository is connected to in the dashboard.
"name": "youtube-generator",
// Keep at or below the date the pinned wrangler's local runtime supports.
"compatibility_date": "2026-09-25",
// Serve the site only on the custom domain. `wrangler deploy` detaches any
// custom domain that is not listed here, so this entry is load-bearing.
"workers_dev": false,
"preview_urls": true,
"routes": [{ "pattern": "ytgenerator.stream", "custom_domain": true }],
"build": { "command": "npm run build" },
"assets": {
"directory": "./dist",
// The app uses hash routing, so every navigation lands on `/`; unknown
// paths fall back to the app shell, which renders its own 404 page.
"not_found_handling": "single-page-application"
},
"observability": { "enabled": true }
}