Skip to content

← Projects

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-rosetta for UI strings, per-field _pt siblings 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.py entry.
  • Search β€” Wagtail database backend, host-scoped (each subdomain searches its own content).
  • 3 RSS/Atom feeds β€” combined feed on www, plus dedicated tech and books feeds.
  • SEO baked in β€” JSON-LD (Person, BlogPosting, Book), OG/Twitter cards, a multi-site-aware sitemap.xml, robots.txt, and hreflang.
  • Giscus comments β€” backed by GitHub Discussions in a dedicated repository.
  • One-command deploy β€” ./scripts/deploy.sh from the laptop pushes and triggers sudo bilouro-deploy on 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, weekly pg_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

View on GitHub