Add marketing hreflang tests and docs
This commit is contained in:
@@ -60,6 +60,20 @@
|
||||
- **Robots.txt**: Allow both locales; noindex for dev.
|
||||
- **Accessibility**: ARIA labels with `t()`; screen reader support for language switches.
|
||||
|
||||
### SEO Implementation Notes (Marketing)
|
||||
- **Source of tags**: `resources/js/layouts/mainWebsite.tsx` renders canonical + hreflang links for Inertia marketing pages.
|
||||
- **URL building**: `resources/js/lib/localizedPath.ts` handles locale rewrites (e.g., `/kontakt` ↔ `/contact`) and prefixing.
|
||||
- **Data inputs**: `supportedLocales`, `locale`, and `appUrl` are shared via `app/Http/Middleware/HandleInertiaRequests.php`.
|
||||
- **SSR**: Inertia SSR is disabled (`config/inertia.php`), so canonical/hreflang tags are client-rendered.
|
||||
|
||||
### Validation Checklist (Search Console + Lighthouse)
|
||||
- Verify canonical + hreflang output on key marketing pages (home, contact, packages, blog, occasions).
|
||||
- Use Search Console URL inspection to confirm rendered HTML contains canonical + hreflang tags.
|
||||
- Run Lighthouse SEO audit on both `/de/*` and `/en/*` routes (spot-check canonical + alternate links).
|
||||
|
||||
### Tests
|
||||
- **Vitest**: `resources/js/layouts/__tests__/mainWebsite.seo.test.tsx` validates canonical/hreflang output and localized slug rewrites.
|
||||
|
||||
## Migration from PHP to JSON
|
||||
- Extract keys from `resources/lang/\{locale\}/marketing.php` to `public/lang/\{locale\}/marketing.json`.
|
||||
- Consolidate: Remove duplicates; use nested objects (e.g., `{ "header": { "login": "Anmelden" } }`).
|
||||
|
||||
Reference in New Issue
Block a user