Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 1.91 KB

File metadata and controls

53 lines (34 loc) · 1.91 KB

Development

Stack

TypeScript, React, Vite, Tailwind CSS. Hosted on GitHub Pages with base: '/WebFileTools/'.

Scripts

  • npm run dev — local development
  • npm run build — production build + 404.html copy for SPA fallback
  • npm run preview — preview the production build

Environment

Optional Google Analytics (build-time):

VITE_GA_MEASUREMENT_ID=G-XXXXXXXX

GitHub Actions (production)

  1. Open Settings → Secrets and variables → Actions
  2. New repository secret
    • Name: VITE_GA_MEASUREMENT_ID
    • Value: your Measurement ID from Google Analytics (G-XXXXXXXX)
  3. Push / re-run Deploy to GitHub Pages so npm run build picks it up

Local .env is only for npm run dev / local builds. Pages deploy uses the Actions secret.

Without this variable, analytics stays disabled.

Conventions

  • Keep file processing client-side only.
  • Add tools as independent modules under src/tools/.
  • Register lazy pages in src/tools/loadTool.ts and mark ready in registry.ts.
  • Update README (en/ja), docs (en/ja), and UI strings together when features change.

SEO / LLM discovery

Build runs scripts/postbuild-seo.mjs, which writes:

  • Per-route HTML under dist/ for English (/, /tools/...) and Japanese (/ja, /ja/tools/...) with localized title, description, Open Graph text, og:locale, hreflang, canonical, JSON-LD, and a noscript crawler blurb (no og:image)
  • dist/sitemap.xml (EN+JA URLs with xhtml hreflang), dist/robots.txt
  • dist/llm.txt, dist/llm-full.txt
  • dist/404.html SPA fallback

Language in the URL is the source of truth for UI and OGP (footer language switch navigates between /… and /ja/…). Client navigation updates the same meta via src/seo/SeoListener.tsx.

Note on Character Count

OpenAI token counts use js-tiktoken (cl100k_base). The tokenizer payload is large and loaded only when that tool is opened.