Show the own site icon to Google under every address, and the KANTARCI landing page
- Google kept showing the KantSites K for Elektro Bernhard after the site icon was changed. The own icon only existed at 32 and 180 px, and Google takes multiples of 48 only; /favicon.svg was a file in public/, so the web server always delivered the bundled K. - The icon is now also cut at 48 and 192 px. The head links /favicon-192.png, /favicon.ico serves the 48 px PNG, and /favicon.svg is answered by the application: the bundled mark without an own icon (now in public/assets/favicon.svg), otherwise a 302 to the 192 px PNG. Sites that set their icon earlier get the new sizes on first request. A removed icon no longer counts even though its files remain. - The archive update only adds files to public/, so it now deletes the old public/favicon.svg explicitly. - Seventh local reference site: the KANTARCI Immobilien landing page with a three-step rental request, own database, seed and reset scripts. Tests: 582 PHPUnit on PHP 8.2 and 8.4, 35 node, test:editor and test:browser green (test:browser reports only the known editor colour contrast on /grundlagen). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
42e74af052
commit
45d1141951
14 files changed
+1057
-12
No files matched your search
@@ -1,10 +1,12 @@
|
||||
{# Das Symbol der Website. Eigenes Bild aus den Einstellungen, sonst das mitgelieferte Zeichen.
|
||||
Die Kennung hängt als Version am Verweis, damit ein Wechsel im Browser auch ankommt. #}
|
||||
Die Kennung hängt als Version am Verweis, damit ein Wechsel im Browser auch ankommt.
|
||||
Das 192er ist für die Google-Suche: sie nimmt nur Vielfache von 48 px. #}
|
||||
{% set site = siteSettings.load() %}
|
||||
{% set favicon = site.faviconMediaId|default('') %}
|
||||
{% set version = site.faviconVersion|default('') ?: favicon|slice(0, 8) %}
|
||||
{% if favicon %}
|
||||
<link rel="icon" href="/favicon.png?v={{ version }}" type="image/png" sizes="32x32">
|
||||
<link rel="icon" href="/favicon-192.png?v={{ version }}" type="image/png" sizes="192x192">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png?v={{ version }}">
|
||||
{% else %}
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||||
|
||||
Reference in new issue
Block a user