- VitecMetaHandler: Record-Metadaten fuer News-/Produkt-/Story-Details (Titel, Description, og:/twitter:-Tags, og:image), '| VITEC'-Suffix, Fallback-Description aus Seitenfeldern, twitter:card large_image, Story-Canonical auf die oeffentliche Kurz-URL - PageJsonLdRenderer: Product- und NewsArticle-Nodes auf Detailseiten (News-Details hatten <title>article</title> und kein Schema) - NewsJsonRenderer: Listen ohne Volltext-Body (JSON 2.6 MB -> ~0.6 MB) - XML-Sitemap: News-Teil konfiguriert (Ordner 11+442, Detailseite 21), Record-Sitemaps fuer Produkte und Success Stories (kurze URLs), Route-Enhancer fuer alle Teile, Shell-/Altseiten ausgeschlossen - Migration seo_fixes_20261109: 161 Self-Canonicals geleert (warfen u.a. Home, Markets, Solutions, Support aus der Sitemap), noindex fuer technische und alte News-Seiten, 71 Redirects Alt-URLs -> neue Ziele, 51 tote Footer-Links ersetzt - public/robots.txt mit Sitemap-Verweis Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
30 lines
857 B
PHP
30 lines
857 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Evomedien\Vitec\Seo;
|
|
|
|
use TYPO3\CMS\Seo\XmlSitemap\RecordsXmlSitemapDataProvider;
|
|
|
|
/**
|
|
* Success-story sitemap entries with their PUBLIC URLs.
|
|
*
|
|
* The route enhancer generates /success-stories/story/<slug>, but the
|
|
* public canonical URL is /success-stories/<slug> (SuccessStoryPathRewrite
|
|
* middleware, old-site SEO URLs). The sitemap must list the canonical
|
|
* form, so the generated loc is rewritten accordingly.
|
|
*/
|
|
final class StoriesXmlSitemapDataProvider extends RecordsXmlSitemapDataProvider
|
|
{
|
|
protected function defineUrl(array $data): array
|
|
{
|
|
$data = parent::defineUrl($data);
|
|
|
|
if (isset($data['loc']) && is_string($data['loc'])) {
|
|
$data['loc'] = str_replace('/success-stories/story/', '/success-stories/', $data['loc']);
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
}
|