Velohost Velohost

Astro Integration

Astro Head Check

Build-time validation of essential HTML <head> metadata for Astro — no runtime code, no dashboards, no tracking.

Last Updated: 01 April 2026

Usage Snapshot

127

Downloads in Last 30 Days

v1.1.0

Latest npm Version

Source: npm registry

Why This Plugin Exists

Missing or malformed <head> metadata is one of the most common causes of silent SEO and indexing issues.

Astro Head Check scans generated HTML files at build time and validates essential metadata before deployment.

It provides deterministic feedback without mutating output or introducing runtime dependencies.

Design Principles

  • Build-time only validation
  • Zero runtime overhead
  • Deterministic output
  • No HTML mutation
  • Explicit failure on misconfiguration

What This Plugin Delivers

  • Validates <title> presence
  • Validates meta description tags
  • Validates canonical link tags
  • Optional robots meta validation
  • Configurable checks per project
  • Warning-only or hard-fail modes
  • Automatically skips 404 pages
  • Skips redirect shim pages

Installation

npm install astro-head-check

After installation, add the integration to your astro.config.mjs to enable build-time validation.

FAQs

Does Astro Head Check run at runtime?

No. Astro Head Check runs entirely at build time and produces no runtime JavaScript.

Can Astro Head Check fail a build?

Yes. It supports both warning-only and hard-fail build modes depending on configuration.

Does it modify HTML output?

No. Astro Head Check only validates output and never mutates HTML.

Implementation FAQs

What does Astro Head Check validate?

It validates the presence and correctness of <title>, meta description, canonical link, and optionally robots meta tags.

Can Astro Head Check fail a build?

Yes. When configured in error mode, the build fails immediately if validation issues are found.

What is warning mode?

Warning mode logs issues but allows the build to complete successfully.

Are 404 pages checked?

No. 404 pages are automatically skipped to avoid false positives.

How are redirect pages handled?

Pages using meta refresh redirects are detected and skipped automatically.

Does the plugin modify HTML output?

No. Astro Head Check performs validation only and never mutates output files.

Project Links

Source code, package distribution, releases, and documentation.

Need Implementation Details?

Read the FAQs for usage patterns, integration caveats, and rollout guidance.