Files
youtube-generator/index.html
T
poli0981andClaude Opus 5.5 5ced6b4a86 feat(web): Turnstile gate, in-site legal pages and clean URLs on ytgenerator.stream
A Worker (worker/) now sits in front of the static build, configured from the
same wrangler.jsonc. Cloudflare builds and deploys it; nothing in GitHub
Actions does.

Gate
- First visit shows a branded check page (8 languages, Accept-Language) with
  Cloudflare Turnstile. The token is verified server-side against
  TURNSTILE_SECRET: success, hostname, action "enter", age <= 300 s. Only
  Cloudflare's own test-key results skip the hostname/action check, so
  `npm run cf:dev` works with the published test keys.
- Pass -> `__Host-ytg_gate` (HttpOnly, Secure, SameSite=Lax, 24 h): an HMAC
  over expiry + a user-agent hash, keyed from the Turnstile secret, so no
  second secret exists and a cookie copied into a scraper is useless.
- The page reloads in place instead of redirecting, so there is no `next`
  parameter to open-redirect with; /__gate/status lets the page tell a
  cookie-blocking browser what is wrong instead of looping; after one
  failure it waits for a click rather than resubmitting.
- Missing secret = deployment mistake: the site stays up without the gate and
  the Worker logs it, instead of locking every visitor out.
- The agree box on the gate records `ytg_terms`, which the app reads on boot
  so web visitors meet one blocking screen, not two.

Headers and static files
- worker/headers.ts sets CSP (nonce + strict-dynamic on the gate, no script
  at all on legal pages), nosniff, Referrer-Policy, Permissions-Policy, COOP,
  CORP, X-Frame-Options on everything the Worker returns; _headers covers
  the files served directly; a test keeps the two baselines identical.
- `not_found_handling: "404-page"` (a static 404.html) instead of the SPA
  fallback, which would have handed index.html past the gate for any
  excluded path. The Worker serves the shell itself by fetching "/" - not
  "/index.html", which html_handling would 307 back to the home page.
- security.txt (RFC 9116) is generated per build so Expires stays ~6 months
  ahead; the Web Analytics beacon is injected into the web build only.
- theme-init.js applies the saved theme before first paint (no inline script).

Legal in-site
- build-plugins/legal-docs.ts renders TERMS, PRIVACY, DISCLAIMER (+ vi),
  LICENSE, THIRD_PARTY_NOTICES, SECURITY, NOTICE and CODE_OF_CONDUCT at build
  time into static /legal pages (public, before the gate) and a lazy
  `virtual:legal-docs` module for the in-app Legal Center, which works
  offline on desktop and Android and never leaves the webview.
- PRIVACY, TERMS and SECURITY rewritten for Cloudflare hosting, Turnstile,
  Web Analytics and the two cookies; contacts moved to the poli0981.dev
  aliases (privacy@, legal@, dmca@, copyright@, security@, code@).
- CURRENT_TERMS_VERSION 1 -> 2: the Privacy Policy changed materially.

App
- Web uses BrowserRouter (real paths; analytics can count them), Tauri keeps
  HashRouter; old /#/x bookmarks are rewritten to /x before the router reads
  them. Consent is a layout route; /legal sits outside it.
- <html lang> follows the UI language; a stale chunk after a deploy triggers
  one reload instead of an error page.

.gitattributes pins LF everywhere so Windows checkouts stop failing Prettier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 19:26:40 +07:00

80 lines
4.1 KiB
HTML

<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8" />
<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="#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 — 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" />
<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" />
<script src="/theme-init.js"></script>
<!-- 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://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" />
<meta name="twitter:site" content="@SkullMute0011" />
<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://ytgenerator.stream/og-image.png" />
<!-- Structured data -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "YTDescGen",
"alternateName": "YouTube Description Generator",
"url": "https://ytgenerator.stream/",
"applicationCategory": "MultimediaApplication",
"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",
"priceCurrency": "USD"
},
"author": {
"@type": "Person",
"name": "SkullMute",
"url": "https://poli0981.dev/"
},
"license": "https://github.com/poli0981/youtube-generator/blob/main/LICENSE"
}
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>