SEO: Wiki-Rasse JSON-LD Article→ItemPage+Dog, Deep-Link Züchter/Welpen, Footer verbessert

This commit is contained in:
rene 2026-05-12 18:48:30 +02:00
parent c25580ec8e
commit 62ee64bc53

View file

@ -764,15 +764,32 @@ async def wiki_rasse_page(slug: str):
desc = f"{name}{beschr_str[:160]}".strip().rstrip(".")
else:
desc = f"{name} — Hunderasse aus {herkunft}. Größe: {groesse}. Aktivität: {aktivitaet}. {temp_str[:120] if temp_str else ''}".strip().rstrip(".")
# Optionale Dog-Schema-Felder
dog_schema_extras = []
if r.get("lebensdauer"):
dog_schema_extras.append(f'"typicalAgeAtDeath":"{esc(r["lebensdauer"])}"')
if herkunft:
dog_schema_extras.append(f'"countryOfOrigin":"{herkunft}"')
if r.get("gruppe"):
dog_schema_extras.append(f'"breedGroup":"{gruppe}"')
if gewicht:
dog_schema_extras.append(f'"weight":"{gewicht}"')
dog_extras_str = (", " + ", ".join(dog_schema_extras)) if dog_schema_extras else ""
json_ld = f"""{{
"@context":"https://schema.org",
"@type":"Article",
"headline":"{name} — Rasse-Profil",
"@type":"ItemPage",
"headline":"{name}Hunderasse Profil",
"description":"{desc}",
"url":"https://banyaro.app/wiki/rasse/{slug}",
"inLanguage":"de",
"publisher":{{"@type":"Organization","name":"Ban Yaro","url":"https://banyaro.app"}},
"mainEntityOfPage":{{"@type":"WebPage","@id":"https://banyaro.app/wiki/rasse/{slug}"}}
"mainEntityOfPage":{{"@type":"WebPage","@id":"https://banyaro.app/wiki/rasse/{slug}"}},
"about":{{
"@type":"Dog",
"name":"{name}",
"description":"{desc}"{dog_extras_str}
}}
}}"""
html = f"""<!DOCTYPE html>
@ -882,13 +899,20 @@ async def wiki_rasse_page(slug: str):
Ban Yaro ist die kostenlose Hunde-App für Deutschland, Österreich und die Schweiz.
Tagebuch, Impfpass, Giftköder-Alarm, Gassi-Community und mehr DSGVO-konform, ohne App Store.
</p>
<a href="/" class="cta">Kostenlos starten</a>
<div style="display:flex;flex-wrap:wrap;gap:.6rem;margin-bottom:1rem">
<a href="/" class="cta">Kostenlos starten</a>
{f'<a href="/wurfboerse?rasse={slug}" class="cta" style="background:#f5e6d3;color:#a86e2e;border:1px solid #e8cba8">{name}-Welpen auf Ban Yaro</a>' if zuchter_count > 0 else ''}
</div>
<p style="font-size:.8rem;color:#888">
{f'{zuchter_count} verifizierte {name}-Züchter · ' if zuchter_count > 0 else ''}{dogs_count} Nutzer haben diesen Hund · <a href="/wiki/rassen">Alle 1003 Rassen</a>
</p>
</section>
</div>
<footer>
<strong style="color:#fff">Ban Yaro</strong> Hunderassen-Wiki ·
<a href="/wiki/rassen">Alle Rassen</a> ·
<a href="https://banyaro.app">banyaro.app</a>
<strong style="color:#fff">Ban Yaro</strong> Die Hunde-App für DACH ·
<a href="/wiki/rassen">Hunderassen-Wiki</a> ·
<a href="https://banyaro.app">banyaro.app</a> ·
<a href="https://banyaro.app/#impressum">Impressum</a>
</footer>
</body>
</html>"""