mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 22:04:10 +00:00
Tests: - Update frontend.e2e.spec.ts with locale testing - Add search.e2e.spec.ts for search functionality - Add i18n.int.spec.ts for localization tests - Add search.int.spec.ts for search integration - Update playwright.config.ts Documentation: - Add CLAUDE.md with project instructions - Add docs/ directory with detailed documentation - Add scripts/ for utility scripts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
173 lines
4.4 KiB
Markdown
173 lines
4.4 KiB
Markdown
# SEO-Erweiterung
|
|
|
|
## Übersicht
|
|
|
|
Diese Dokumentation beschreibt die implementierten SEO-Features für das Payload CMS Multi-Tenant System.
|
|
|
|
## Implementierte Features
|
|
|
|
### 1. Dynamische Sitemap (`/sitemap.xml`)
|
|
|
|
**Datei:** `/src/app/sitemap.ts`
|
|
|
|
Die Sitemap wird dynamisch aus der Datenbank generiert und enthält:
|
|
- Startseite (Priorität: 1.0, Änderungshäufigkeit: täglich)
|
|
- Alle veröffentlichten Seiten (Priorität: 0.8, Änderungshäufigkeit: wöchentlich)
|
|
- Alle veröffentlichten Posts mit typ-basierter URL (Priorität: 0.6, Änderungshäufigkeit: monatlich)
|
|
|
|
**URL-Schema für Posts:**
|
|
| Post-Typ | URL-Prefix |
|
|
|----------|------------|
|
|
| blog | `/blog/{slug}` |
|
|
| news | `/news/{slug}` |
|
|
| press | `/presse/{slug}` |
|
|
| announcement | `/aktuelles/{slug}` |
|
|
|
|
### 2. Robots.txt (`/robots.txt`)
|
|
|
|
**Datei:** `/src/app/robots.ts`
|
|
|
|
Konfiguriert Crawler-Zugriff:
|
|
```
|
|
User-Agent: *
|
|
Allow: /
|
|
Disallow: /admin
|
|
Disallow: /admin/*
|
|
Disallow: /api/*
|
|
Disallow: /_next/*
|
|
Disallow: /media/*
|
|
|
|
User-Agent: Googlebot
|
|
Allow: /
|
|
Disallow: /admin
|
|
Disallow: /api
|
|
|
|
Host: https://pl.c2sgmbh.de
|
|
Sitemap: https://pl.c2sgmbh.de/sitemap.xml
|
|
```
|
|
|
|
### 3. Structured Data (JSON-LD)
|
|
|
|
**Datei:** `/src/lib/structuredData.ts`
|
|
|
|
Bietet Helper-Funktionen für Schema.org-konforme JSON-LD Daten:
|
|
|
|
#### Verfügbare Funktionen
|
|
|
|
| Funktion | Beschreibung |
|
|
|----------|--------------|
|
|
| `generateOrganizationSchema()` | Organization Schema |
|
|
| `generateArticleSchema()` | Article Schema für Blog-Posts |
|
|
| `generateNewsArticleSchema()` | NewsArticle Schema |
|
|
| `generateWebPageSchema()` | WebPage Schema |
|
|
| `generateBreadcrumbSchema()` | BreadcrumbList Schema |
|
|
| `generateFAQSchema()` | FAQPage Schema |
|
|
| `generateReviewSchema()` | Review/Testimonial Schema |
|
|
| `generateAggregateRatingSchema()` | AggregateRating Schema |
|
|
| `generateLocalBusinessSchema()` | LocalBusiness Schema |
|
|
| `generateWebSiteSchema()` | WebSite Schema mit SearchAction |
|
|
| `combineSchemas()` | Kombiniert mehrere Schemas |
|
|
| `renderJsonLd()` | Sicheres Rendering von JSON-LD |
|
|
|
|
#### Verwendungsbeispiel
|
|
|
|
```tsx
|
|
import { generateArticleSchema, renderJsonLd } from '@/lib/structuredData'
|
|
|
|
export default function BlogPost({ post }) {
|
|
const schema = generateArticleSchema({
|
|
title: post.title,
|
|
description: post.excerpt,
|
|
slug: post.slug,
|
|
publishedAt: post.publishedAt,
|
|
updatedAt: post.updatedAt,
|
|
author: post.author,
|
|
featuredImage: post.featuredImage,
|
|
categories: post.categories,
|
|
}, 'https://example.com')
|
|
|
|
return (
|
|
<>
|
|
<script
|
|
type="application/ld+json"
|
|
dangerouslySetInnerHTML={{ __html: renderJsonLd(schema) }}
|
|
/>
|
|
<article>...</article>
|
|
</>
|
|
)
|
|
}
|
|
```
|
|
|
|
### 4. SEO Settings Global
|
|
|
|
**Datei:** `/src/globals/SEOSettings.ts`
|
|
|
|
Globale SEO-Konfiguration im Admin-Panel unter "Einstellungen > SEO Einstellungen":
|
|
|
|
#### Meta-Defaults
|
|
- Titel-Suffix (z.B. "| Firmenname")
|
|
- Standard Meta-Beschreibung
|
|
- Standard Social Media Bild
|
|
- Standard Keywords
|
|
|
|
#### Organisation (Schema.org)
|
|
- Firmenname & rechtlicher Name
|
|
- Unternehmensbeschreibung
|
|
- Logo
|
|
- Gründungsdatum
|
|
|
|
#### Kontaktdaten
|
|
- E-Mail
|
|
- Telefon
|
|
- Fax
|
|
|
|
#### Adresse
|
|
- Straße & Hausnummer
|
|
- PLZ, Stadt, Region
|
|
- Land & Ländercode
|
|
|
|
#### Geo-Koordinaten
|
|
- Breitengrad
|
|
- Längengrad
|
|
|
|
#### Social Media Profile
|
|
- Plattform (Facebook, Instagram, Twitter, LinkedIn, YouTube, etc.)
|
|
- Profil-URL
|
|
|
|
#### Local Business
|
|
- Schema aktivieren/deaktivieren
|
|
- Geschäftstyp (Arztpraxis, Anwaltskanzlei, Restaurant, etc.)
|
|
- Preiskategorie (€ bis €€€€)
|
|
- Öffnungszeiten
|
|
|
|
#### Robots & Indexierung
|
|
- Indexierung erlauben/verbieten
|
|
- Zusätzliche Pfade ausschließen
|
|
|
|
#### Verifizierungscodes
|
|
- Google Search Console
|
|
- Bing Webmaster Tools
|
|
- Yandex Webmaster
|
|
|
|
## Datenbank-Tabellen
|
|
|
|
Die Migration `20251130_150000_blocks_tables.ts` erstellt:
|
|
|
|
- `seo_settings` - Haupttabelle für SEO-Einstellungen
|
|
- `seo_settings_meta_defaults_keywords` - Keywords Array
|
|
- `seo_settings_social_profiles` - Social Media Profile
|
|
- `seo_settings_local_business_opening_hours` - Öffnungszeiten
|
|
- `seo_settings_robots_additional_disallow` - Ausgeschlossene Pfade
|
|
|
|
## URLs
|
|
|
|
- **Sitemap:** https://pl.c2sgmbh.de/sitemap.xml
|
|
- **Robots:** https://pl.c2sgmbh.de/robots.txt
|
|
- **SEO Settings:** https://pl.c2sgmbh.de/admin/globals/seo-settings
|
|
|
|
## Nächste Schritte
|
|
|
|
1. SEO Settings im Admin-Panel konfigurieren
|
|
2. JSON-LD in Frontend-Templates einbinden
|
|
3. Meta-Tags in Layout integrieren
|
|
4. Google Search Console einrichten
|