The Problem
When building a multilingual blog (RU/EN) for algorithmic trading content, we faced three core challenges:
Content parity : How to ensure every RU article has an EN counterpart with matching metadata?
Quality control : How to catch broken links, invalid JSON-LD, and duplicate routes before deployment?
UX consistency : How to maintain scroll position when switching languages?
The Solution
We built a validation pipeline with strict TypeScript guards for content parity.
1. Automated Validation Script
We created npm run verify that runs 5 checks:
#!/bin/bash # 1. Build project npm run build
# 2. Check JSON-LD (no raw stringify) grep -r "JSON.stringify" dist/ && exit 1
# 3. Check duplicate paths (404) # Custom script to find duplicate routes
# 4. Check NUL bytes in Markdown grep -r $' \0 ' src/content/ && exit 1
# 5.…