From 4f97a6592c4caac22a3867b65764b084cda71ba9 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Wed, 23 Sep 2026 07:07:42 +0000 Subject: [PATCH] Relax automatic large-card pick: w > 600, h > 400, aspect > 1.05 The old 1.4-2.5 aspect window sent big near-square images (e.g. 1350x1200) to the compact layout despite ample resolution. The new rule keeps square and portrait images compact (the compact box fits them) while letting anything big and clearly wider than tall render as a full-card cover. --- docs/backend.md | 2 +- pagerite/views.py | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/backend.md b/docs/backend.md index ab769ba..f4aec75 100644 --- a/docs/backend.md +++ b/docs/backend.md @@ -34,7 +34,7 @@ markdown-it-py renderer (html passthrough + attrs, footnote, deflist, tasklists, The shared page layout as an html5tagger `Template` with placeholders (`Title`, `Brand`, `Banner`, `Nav`, `Sidebar`, `Main`), nav rendering straight from the `Data.menu` tree (siblings sorted by `Node.order`; nav links to content-less labels point at their first child via `first_leaf`, the first published descendant with content), and page/404 rendering. -Content pages get SEO/social meta (description, canonical link, Open Graph + twitter card) from heuristics over the rendered article: the description is the first paragraph's text; the card image is the node's own `Node.image` when set, otherwise mined from the article (preferring a `{.hero}`-classed image, then the first raster ``, then the first SVG), and only when the article yields none the inherited one (nearest ancestor, front page last — see docs/content-model.md); the first `