Transactional mail, crawler metadata, and asset measurement (#179)

* Send transactional email from no-reply@mail.innersquare.app

Centralise the sender identity, reply-to address and SES configuration set in Chesstrainer.Mail so no notifier can drift. Add MAIL_REDIRECT_TO for smoke tests and a mix mail.check task that exercises the SES mailbox simulators, and document the setup in the deploy guide and .env.example.

* Tighten crawler metadata and keep play pages out of search

Canonical URLs no longer carry query strings, public pages get an OG image, WebSite JSON-LD and a per-page language, and the sitemap dates the landing page only. Play and guest-training routes are marked noindex so tens of thousands of near-identical pages stay out of the index.

* Measure built asset sizes with mix assets.sizes

Report raw, gzip and brotli sizes for built JS and CSS, and record the current numbers plus the board-code split recommendation in docs/assets.md.
This commit is contained in:
2026-11-17 10:29:45 +01:00
committed by GitHub
parent b33c5e334a
commit 37e0ac8e56
24 changed files with 666 additions and 44 deletions
@@ -6,6 +6,7 @@ defmodule ChesstrainerWeb.PageController do
alias Chesstrainer.Branding
alias Chesstrainer.DailyPuzzles
alias Chesstrainer.Endgames
alias ChesstrainerWeb.SEO
@description "Short, focused endgame puzzles against tablebase-perfect defence. " <>
"Learn to see the winning move and make the endgame your strongest phase."
@@ -15,13 +16,15 @@ defmodule ChesstrainerWeb.PageController do
render_coming_soon(conn)
else
endgames = Endgames.curated_endgames()
canonical_url = SEO.canonical_url(conn)
conn
|> assign(:js_entry, ~p"/assets/js/marketing.js")
|> assign(:page_title, Branding.home_title())
|> assign(:title_suffix, "")
|> assign(:meta_description, @description)
|> assign(:canonical_url, current_url(conn))
|> assign(:canonical_url, canonical_url)
|> assign(:json_ld, SEO.json_ld(canonical_url))
|> assign(:mailing_list_enabled, mailing_list_enabled?())
|> render(:home,
endgames: endgames,
@@ -43,7 +46,7 @@ defmodule ChesstrainerWeb.PageController do
:meta_description,
"How #{Branding.name()} collects, uses, and protects your personal data."
)
|> assign(:canonical_url, current_url(conn))
|> assign(:canonical_url, SEO.canonical_url(conn))
|> render(:privacy)
end
@@ -53,7 +56,7 @@ defmodule ChesstrainerWeb.PageController do
|> assign(:page_title, Branding.title("Terms & Conditions"))
|> assign(:title_suffix, "")
|> assign(:meta_description, "The terms that apply when you use #{Branding.name()}.")
|> assign(:canonical_url, current_url(conn))
|> assign(:canonical_url, SEO.canonical_url(conn))
|> render(:terms_conditions)
end
@@ -66,7 +69,8 @@ defmodule ChesstrainerWeb.PageController do
:meta_description,
"Éditeur, hébergeur et informations légales de #{Branding.name()}."
)
|> assign(:canonical_url, current_url(conn))
|> assign(:canonical_url, SEO.canonical_url(conn))
|> assign(:lang, "fr")
|> render(:mentions_legales)
end
@@ -86,7 +90,7 @@ defmodule ChesstrainerWeb.PageController do
|> assign(:page_title, Branding.home_title())
|> assign(:title_suffix, "")
|> assign(:meta_description, @description)
|> assign(:canonical_url, current_url(conn))
|> assign(:canonical_url, SEO.canonical_url(conn))
|> assign(:noindex, true)
|> assign(:mailing_list_enabled, mailing_list_enabled?())
|> render(:coming_soon)