Mobile-first web app for Ngau calculation with poker-themed UI.
- React + Vite
- Tailwind CSS
- zustand
- Client-side Ngau logic ported from
main.py
npm install
npm run devnpm run build
npm run preview- AdSense loader script is included in
index.htmlwith clientca-pub-7820179081725825. - A single manual ad slot is rendered below the rules section.
- Set
VITE_ADSENSE_SLOT_PHASE1in.envwith your real ad unit slot ID (10+ digits). The placeholder value in.env.exampleis intentionally ignored.
- In GitHub repo settings, set Pages > Build and deployment > Source to
GitHub Actions. - Push to
main. - Workflow
.github/workflows/deploy-pages.ymlbuilds and deploysdist.
vite.config.js uses a relative base (./) so built assets and page links work under repo subpaths like /<repo>/ on GitHub Pages.
index.htmlincludes canonical URL, Open Graph tags, Twitter card tags, and JSON-LD (WebApplication).- Content subpages are built as standalone HTML entries:
how-to-play-ngau.htmlngau-rules-explained.htmlngau-3-6-explained.htmlngau-example-rounds.htmlngau-faq.html
npm run buildrunsnpm run seo:generatefirst to generate:public/robots.txtpublic/sitemap.xml
deploy-pages.ymlinjectsVITE_SITE_URLfrom the GitHub repository URL so canonical and sitemap are correct on Pages.