# Metadata Validation Checklist

**Last Updated:** 2026-03-08
**Post:** Zeitausgleich

## Overview

This document tracks metadata validation improvements added during post creation to ensure completeness and prevent missing metadata in future posts.

## Metadata Fields Validated

### 1. Excerpt
- **Status:** ✓ Validated
- **Check:** Placeholder detection (checks for "Platzhalter", "Inhalt wird erstellt", "Dieses Thema behandelt")
- **Requirement:** Excerpt should match or be similar to meta.description (50%+ similarity)
- **Current:** "Zeitausgleich erklärt: Definition, Berechnung & rechtliche Grundlagen. Unterschied zu Freizeitausgleich & Urlaub. Mit Berechnungsbeispielen und Praxistipps."

### 2. Meta Title
- **Status:** ✓ Validated
- **Check:** Length validation (30-60 chars recommended)
- **Requirement:** Should not exceed 60 chars for optimal SERP display
- **Current:** "Zeitausgleich: Definition, Berechnung & Rechtliches 2026" (58 chars)

### 3. Meta Description
- **Status:** ✓ Validated
- **Check:** Length validation (120-165 chars recommended, 150-160 optimal)
- **Requirement:** Should be 150-160 chars for optimal SERP display
- **Check:** Placeholder detection
- **Current:** "Zeitausgleich erklärt: Definition, Berechnung & rechtliche Grundlagen. Unterschied zu Freizeitausgleich & Urlaub. Mit Berechnungsbeispielen und Praxistipps." (158 chars)

### 4. SEO Meta File Consistency
- **Status:** ✓ Validated
- **Check:** `data/seo-meta.json` exists and matches post JSON meta fields
- **Requirement:** Post JSON meta.title and meta.description should match seo-meta.json
- **Sync Command:** `php v2/scripts/blog/sync-meta-to-posts.php --post={slug} --category={category}`

## Validation Script Updates

### Enhanced `validate-new-post.php`

Added validation checks for:

1. **Excerpt Validation:**
   - Placeholder detection
   - Similarity check with meta.description

2. **Meta Title Validation:**
   - Length check (30-60 chars)
   - Warning if too short (<30) or too long (>60)

3. **Meta Description Validation:**
   - Length check (120-165 chars, optimal 150-160)
   - Placeholder detection
   - Warning if too short (<120) or too long (>165)

4. **SEO Meta File Validation:**
   - File existence check
   - Consistency check (post JSON vs seo-meta.json)
   - Warning if mismatch detected

## Usage

Run validation before deployment:

```bash
php v2/scripts/blog/validate-new-post.php --post=zeitausgleich --category=lexikon
```

## Future Posts

These validation checks are now part of the standard validation workflow. When creating new posts:

1. **Create SEO meta file:** `docs/content/blog/posts/{category}/{slug}/data/seo-meta.json`
2. **Sync meta:** Run `sync-meta-to-posts.php` to sync to post JSON
3. **Update excerpt:** Ensure excerpt matches meta.description (no placeholder)
4. **Validate:** Run `validate-new-post.php` to check all metadata fields

## Related Documentation

- `docs/content/blog/guides/SEO_OPTIMIZATION_GUIDE.md` - SEO best practices
- `v2/scripts/blog/validate-new-post.php` - Validation script
- `v2/scripts/blog/sync-meta-to-posts.php` - Meta sync script
