Add Spanish and Arabic versions, a contact form captcha and a multilingual sitemap

- English, Spanish (/es) and Arabic (/ar, right to left) versions of every page, with a language switch
- Self-hosted "I'm not a robot" check on the contact form; the message field is optional
- Google Tag Manager, GA4 and Search Console verification in the shared layout
- Sitemap, robots.txt and canonical links point at aigrowthtechnologies.com
This commit is contained in:
Alejandro Veras
2026-10-13 11:53:18 -04:00
parent e6d06d6fd0
commit 828a81f3a5
105 changed files with 21097 additions and 788 deletions
+13 -2
View File
@@ -18,7 +18,8 @@ Copy `.env.example` to `.env.production` (or `.env.local` for development) and f
| `RESEND_API_KEY` | yes | Resend key with sending access to `aigrowthtechnologies.com`. Without it the contact form shows an error. |
| `CONTACT_FROM` | yes | Sender, on the domain verified in Resend: `AI Growth Website <hello@aigrowthtechnologies.com>` |
| `CONTACT_TO` | no | Inbox that receives enquiries; separate several with commas. Defaults to `rey@aigrowth360.io`. |
| `TURNSTILE_SECRET_KEY` / `NEXT_PUBLIC_TURNSTILE_SITE_KEY` | no | Cloudflare Turnstile. When both are set, the form shows the challenge. `NEXT_PUBLIC_*` values are baked in at build time, so rebuild after changing it. |
| `SITE_URL` | no | Public address used for canonical links, hreflang, `sitemap.xml` and `robots.txt`. Defaults to `https://aigrowthtechnologies.com`. |
| `CAPTCHA_SECRET` | no | Signs the contact form's "I'm not a robot" challenges (a self-hosted proof of work, no third-party account). Without it a random secret is used per process, which only matters across restarts. |
## Deploying to a VPS
@@ -68,6 +69,12 @@ Then issue HTTPS with `sudo certbot --nginx -d aigrowthtechnologies.com -d www.a
At Hostinger, point the `A` records for `@` and `www` to the VPS IP. Leave the MX records (Titan email) and the Resend
records (`send`, `resend._domainkey`) as they are.
## Languages
The site is served in English (`/`), Spanish (`/es`) and Arabic (`/ar`, right to left). `src/proxy.ts` maps the
unprefixed English URLs onto `app/[lang]`. Interface strings live in `src/i18n/ui/`, homepage copy in
`src/content/home/`, and content pages in `src/content/pages/<locale>/`.
## Content
Inner pages are generated from the Word copy decks:
@@ -76,4 +83,8 @@ Inner pages are generated from the Word copy decks:
python3 -E scripts/convert-docs.py "<folder with the .docx files>"
```
This rewrites `src/content/pages/*.json`. The homepage (`src/app/page.tsx`) is written by hand.
This rewrites `src/content/pages/en/*.json`. The homepage (`src/app/[lang]/page.tsx`) is written by hand.
Translations keep the English structure. `python3 -E scripts/i18n.py extract <dir>` writes the strings to translate,
`python3 -E scripts/i18n.py apply <es|ar> <dir>` writes the translated pages, and
`python3 -E scripts/i18n.py index` regenerates `src/content/pages/index.ts`.