SEO: Wiki-Rasse JSON-LD Article→ItemPage+Dog, Deep-Link Züchter/Welpen, Footer verbessert
This commit is contained in:
parent
c25580ec8e
commit
62ee64bc53
1 changed files with 31 additions and 7 deletions
|
|
@ -764,15 +764,32 @@ async def wiki_rasse_page(slug: str):
|
||||||
desc = f"{name} — {beschr_str[:160]}".strip().rstrip(".")
|
desc = f"{name} — {beschr_str[:160]}".strip().rstrip(".")
|
||||||
else:
|
else:
|
||||||
desc = f"{name} — Hunderasse aus {herkunft}. Größe: {groesse}. Aktivität: {aktivitaet}. {temp_str[:120] if temp_str else ''}".strip().rstrip(".")
|
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"""{{
|
json_ld = f"""{{
|
||||||
"@context":"https://schema.org",
|
"@context":"https://schema.org",
|
||||||
"@type":"Article",
|
"@type":"ItemPage",
|
||||||
"headline":"{name} — Rasse-Profil",
|
"headline":"{name} — Hunderasse Profil",
|
||||||
"description":"{desc}",
|
"description":"{desc}",
|
||||||
"url":"https://banyaro.app/wiki/rasse/{slug}",
|
"url":"https://banyaro.app/wiki/rasse/{slug}",
|
||||||
"inLanguage":"de",
|
"inLanguage":"de",
|
||||||
"publisher":{{"@type":"Organization","name":"Ban Yaro","url":"https://banyaro.app"}},
|
"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>
|
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.
|
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.
|
Tagebuch, Impfpass, Giftköder-Alarm, Gassi-Community und mehr — DSGVO-konform, ohne App Store.
|
||||||
</p>
|
</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>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<strong style="color:#fff">Ban Yaro</strong> — Hunderassen-Wiki ·
|
<strong style="color:#fff">Ban Yaro</strong> — Die Hunde-App für DACH ·
|
||||||
<a href="/wiki/rassen">Alle Rassen</a> ·
|
<a href="/wiki/rassen">Hunderassen-Wiki</a> ·
|
||||||
<a href="https://banyaro.app">banyaro.app</a>
|
<a href="https://banyaro.app">banyaro.app</a> ·
|
||||||
|
<a href="https://banyaro.app/#impressum">Impressum</a>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>"""
|
</html>"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue