DEV Community

Tugelbay Konabayev
Tugelbay Konabayev

Posted on • Originally published at about-kazakhstan.com

Content Quality Gates: Automated 17-Point Article Validation in Node.js

Why Automate Content Quality

When you have 80+ articles, maintaining quality manually is impossible. I built a 17-check quality gate.

The 17 Checks

  1. Word count (min 2000)
  2. H2 heading count (min 8)
  3. Internal links (min 4)
  4. External source citations (min 3)
  5. Statistics with sources (min 5)
  6. FAQ section present
  7. Meta description length (100-160 chars)
  8. Title length (max 70 chars)
  9. Hero image exists
  10. No em dashes
  11. No fluff phrases
  12. H2 answer-first paragraphs (>50%)
  13. Freshness marker present
  14. Comparison table present
  15. No broken internal links
  16. Tags present (min 3)
  17. Cover image alt text

Implementation

The script reads MDX frontmatter with gray-matter, then runs each check against the parsed content. Each check returns pass/fail with the measured value.

Auto-Fix

Some issues fixed automatically: em dash replacement, fluff removal, H2 bold formatting, freshness markers.

Results

0/83 passing to 83/83 (100%) in two sessions. Now runs in CI on every push.

Top comments (0)