Titre « Un service Groupe KA », icônes et image OG servies à la racine
- Titre SSR de l accueil : « Immo-Ka — N propriétés à vendre au Québec · Un service Groupe KA » (partie « toutes les agences » raccourcie). - ka-assets/ -> frontend/public/ (og.png, favicon.svg, apple-touch-icon.png) ; favicon data-URI remplacé par /favicon.svg + apple-touch-icon. - og:image absolue 1200x630 par défaut + twitter:card/twitter:image sur toutes les pages SSR (les fiches gardent leur photo) ; balises statiques d index.html retirées du gabarit pour éviter les doublons. - Vérifié : aucun débordement horizontal à 360/768/1024/1440 px. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5 changed files +20 −4
modified
frontend/index.html
+7 −1
@@ -16,7 +16,13 @@ | ||
| 16 | 16 | <link rel="preconnect" href="https://fonts.googleapis.com" /> |
| 17 | 17 | <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> |
| 18 | 18 | <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet" /> |
| 19 | − <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='12' fill='%231a1214'/%3E%3Ctext x='32' y='45' font-family='Arial Black,sans-serif' font-size='30' font-weight='900' fill='%23e23744' text-anchor='middle'%3EIK%3C/text%3E%3C/svg%3E" /> | |
| 19 | + <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | |
| 20 | + <link rel="apple-touch-icon" href="/apple-touch-icon.png" /> | |
| 21 | + <meta property="og:image" content="https://www.immo-ka.com/og.png" /> | |
| 22 | + <meta property="og:image:width" content="1200" /> | |
| 23 | + <meta property="og:image:height" content="630" /> | |
| 24 | + <meta name="twitter:card" content="summary_large_image" /> | |
| 25 | + <meta name="twitter:image" content="https://www.immo-ka.com/og.png" /> | |
| 20 | 26 | </head> |
| 21 | 27 | <body> |
| 22 | 28 | <div id="root"></div> |
added
frontend/public/apple-touch-icon.png
+0 −0
Binary file not shown.
added
frontend/public/favicon.svg
+5 −0
@@ -0,0 +1,5 @@ | ||
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"> | |
| 2 | +<rect width="64" height="64" rx="14" fill="#141814"/> | |
| 3 | +<rect x="4.5" y="4.5" width="55" height="55" rx="11" fill="none" stroke="#e23744" stroke-opacity="0.35" stroke-width="2"/> | |
| 4 | +<text x="32" y="43" text-anchor="middle" font-family="'Space Grotesk','Arial Black',sans-serif" font-size="30" font-weight="700" letter-spacing="-1" fill="#e23744" transform="rotate(-4 32 32)">Ka</text> | |
| 5 | +</svg> | |
| \ No newline at end of file | ||
added
frontend/public/og.png
+0 −0
Binary file not shown.
modified
immoka/seo.py
+8 −3
@@ -160,6 +160,7 @@ def _template() -> str: | ||
| 160 | 160 | tpl = path.read_text(encoding="utf-8") |
| 161 | 161 | tpl = re.sub(r"<title>.*?</title>\s*", "", tpl, flags=re.S) |
| 162 | 162 | tpl = re.sub(r'<meta name="description"[^>]*>\s*', "", tpl) |
| 163 | + tpl = re.sub(r'<meta (?:property="og:|name="twitter:)[^>]*>\s*', "", tpl) | |
| 163 | 164 | _tpl_cache = (mtime, tpl) |
| 164 | 165 | return tpl |
| 165 | 166 | |
@@ -181,9 +182,13 @@ def _page(title: str, description: str, canonical: str, body: str, | ||
| 181 | 182 | ] |
| 182 | 183 | if og_image: |
| 183 | 184 | head.append(f'<meta property="og:image" content="{_esc(og_image)}" />') |
| 184 | − head.append('<meta name="twitter:card" content="summary_large_image" />') | |
| 185 | 185 | else: |
| 186 | − head.append('<meta name="twitter:card" content="summary" />') | |
| 186 | + og_image = BASE_URL + "/og.png" | |
| 187 | + head.append(f'<meta property="og:image" content="{_esc(og_image)}" />') | |
| 188 | + head.append('<meta property="og:image:width" content="1200" />') | |
| 189 | + head.append('<meta property="og:image:height" content="630" />') | |
| 190 | + head.append('<meta name="twitter:card" content="summary_large_image" />') | |
| 191 | + head.append(f'<meta name="twitter:image" content="{_esc(og_image)}" />') | |
| 187 | 192 | if noindex: |
| 188 | 193 | head.append('<meta name="robots" content="noindex" />') |
| 189 | 194 | for obj in (jsonld or []): |
@@ -294,7 +299,7 @@ def render_home() -> HTMLResponse: | ||
| 294 | 299 | d = _home_data() |
| 295 | 300 | reg = registry() |
| 296 | 301 | total = _fmt_n(d["total"]) |
| 297 | − title = f"Immo-Ka — {total} propriétés à vendre au Québec, toutes les agences" | |
| 302 | + title = f"Immo-Ka — {total} propriétés à vendre au Québec · Un service Groupe KA" | |
| 298 | 303 | desc = (f"{total} propriétés à vendre dans {_fmt_n(d['cities'])} villes du Québec, " |
| 299 | 304 | f"agrégées depuis {d['sources']} sources (RE/MAX, Via Capitale, Sutton, " |
| 300 | 305 | f"Proprio Direct, DuProprio, Centris et plus) — mises à jour en continu. " |
| 301 | 306 | |