bilouro-web β this site
Three-subdomain Wagtail site (www / tech / books) on AWS Lightsail. Bilingual EN/PT content with AI-driven translation and summarisation, search, RSS feeds, SEO, and Giscus comments β all from one Django project.
One Wagtail project serves three subdomains by hostname β www, tech, books β each with its own templates and navigation, sharing the same admin and database.
Main features
- Bilingual content (EN/PT) β three-layer i18n:
gettext+django-rosettafor UI strings, per-field_ptsiblings for translatable page content, and a native-language-only rule for book posts (no machine translation). - AI-driven content ops β OpenAI Platform Prompts (via the Responses API) translate page fields PTβEN and extract real titles + 25β40 word summaries for book posts from the markdown body. Each command is a Django
manage.pyentry. - Search β Wagtail database backend, host-scoped (each subdomain searches its own content).
- 3 RSS/Atom feeds β combined feed on
www, plus dedicatedtechandbooksfeeds. - SEO baked in β JSON-LD (Person, BlogPosting, Book), OG/Twitter cards, a multi-site-aware
sitemap.xml,robots.txt, andhreflang. - Giscus comments β backed by GitHub Discussions in a dedicated repository.
- One-command deploy β
./scripts/deploy.shfrom the laptop pushes and triggerssudo bilouro-deployon the VM: pull, sync, migrate, collectstatic, compilemessages, bootstrap idempotent sites, restart gunicorn, health-check, and auto-rollback on failure. - Operational extras β apex
301-redirected to www, weeklypg_dumpβ S3, S3-hosted media with signed URLs, Certbot for HTTPS on all three hosts.
Migrated mid-build from AWS App Runner to Lightsail (~$22 β ~$8/month) once the multi-site routing made the App Runner model awkward.
Stack
Python, Django 5, Wagtail 7, Postgres 16, nginx, gunicorn, gettext + django-rosetta, OpenAI Responses API, AWS Lightsail, S3, Certbot, uv, ruff