A small mistake in a shared layout can affect every page on a static website. If a canonical, language alternate or footer link is generated incorrectly, the problem is not limited to whichever route the developer happens to be viewing.
The Karastamatis Web Engineering website build produces more than 100 Greek and English pages. That number changes as articles and services are added, so verification cannot depend on a fixed screenshot list. It depends on rules applied to every generated file.
Short answer: A dependable Astro release passes through content-schema validation, type checking, a production build, final-HTML validation and focused browser or API tests. Each layer finds a different class of problem; none replaces the others.
1. The content schema rejects incomplete articles
Articles live in an Astro content collection with a schema. Before a route is generated, fields such as title, description, locale, translation key, date, image path, keywords, service relationship and up to three related articles are checked.
This catches problems such as:
- an empty title or excerpt,
- a meta description beyond the agreed limit,
- an invalid service ID,
- an image path outside the expected public routes,
- a malformed date,
- an article with no keyword context.
The schema does not prove that the copy is accurate or that the image exists. It proves that every entry follows the content contract expected by the templates.
2. astro check verifies templates and types
The next layer examines Astro components, TypeScript and template expressions. It catches broken imports, incompatible types, incorrect props and some markup problems without opening a browser.
This is different from the build. A project may produce files while retaining type diagnostics that warn about fragile behaviour. The release command should therefore not consist of astro build alone.
In this project, the core cycle is:
astro check
astro build
node scripts/validate-built-site.mjs
Tests for dynamic endpoints and browser behaviour affected by the change follow afterwards.
3. The build proves every route can be generated
The production build loads the collections, creates Greek and English routes and executes the logic that connects every article to its translation and related entries.
If a Greek article declares a translation key without a published English counterpart, the route should not ship with a false language switcher. If a related key does not resolve to a real article in the same language, the template stops instead of rendering a broken card.
This is a useful property of a static build: relationship problems that would otherwise appear later as empty UI states can become release blockers.
4. The validator reads final HTML, not just source code
After the build, a Node script walks every generated .html file. For each canonical page, it inspects the output that will be delivered to the browser.
Core checks include:
- exactly one H1,
- presence and uniqueness of title, description and canonical,
- correct document language,
- Greek, English and
x-defaulthreflang, - an existing translated route and reciprocal return link,
- valid JSON-LD with no duplicate
@id, - Open Graph and Twitter image alt text,
- correct author metadata,
- a sitemap discovery link in the document head.
The validator does not ask whether a relevant line exists in one component. It checks whether the build finally produced the required line on every page.
5. Internal links are checked against build output
Every relative href, src, poster and srcset candidate is resolved to an expected path inside dist. If the file or route does not exist, the release fails.
This finds errors an editor may not catch:
- an old slug after a rename,
- an image that moved,
- an incorrect localised route,
- a responsive image candidate that was never generated,
- a link to a removed page with no redirect.
External links need a separate periodic review because their availability is outside the static build and can change independently.
6. The sitemap is compared with canonical pages
The existence of an XML file is not enough. The validator gathers URLs from the generated sitemaps and confirms that every indexable canonical page—apart from genuine 404 routes—is included.
The corresponding rules should prevent staging hosts, redirects, duplicates and noindex pages from entering the sitemap. Google recommends absolute URLs and including the URLs proposed as canonical.
The sitemap therefore is not treated as a checkbox. It is compared with the real page set in the release.
7. Root discovery files are checked as content
robots.txt, a sitemap and llms.txt can return status 200 while still being wrong. A hosting fallback may send home-page HTML for an unknown path.
Build checks include:
- the absolute
Sitemap:declaration in robots, - the intended policy for search and AI crawlers,
- key canonical links in
llms.txt, - valid Markdown-link formatting,
- source-controlled headers and redirects.
This follows a real QA failure: a file appeared to exist because the URL returned 200, but the body was home-page HTML. A correct test needs status, content type and body together.
8. Some visual and accessibility contracts become assertions
Regex cannot verify every design decision. Some decisions do have a precise technical form and deserve protection.
The website checks, for example:
- actual favicon and Apple touch icon dimensions,
- required responsive image candidates and byte budgets,
- the presence of an accessible interactive control,
- the absence of retired animation mounts,
- compatible host elements for
tabpanelroles, - the correct language on the embedded assistant.
These tests came from bugs that had already appeared. The most useful regression suite does not copy the whole DOM; it protects specific contracts that must not break again.
9. Production verification remains a separate step
A perfect dist does not prove that production is correct. The platform may apply redirects, caching, headers, bot management or static fallbacks that do not exist locally.
After deployment, request exact URLs and inspect:
- status code, content type and canonical host,
- redirects and SSL,
robots.txt, sitemaps and other root files,- forms and API methods,
- email delivery,
- representative crawler responses,
- console and CSP errors.
In a previous release, an API handler had unit tests and the static build passed, but the production path reached a home-page fallback and POST returned 405. Only a live request revealed that the backend had been deployed to a different platform product from the one serving the domain.
Choosing the right checks
Not every project needs the same validator. Start with the promises made by the website:
- For a bilingual site, test translation parity and reciprocal hreflang.
- For a large article library, test schemas, related references and duplicate metadata.
- For lead collection, test validation, consent, delivery and failure states.
- For rich media, test dimensions, candidates, budgets and reduced motion.
- For a dynamic API, add safe production smoke tests.
Every serious bug should produce one question: can the same class of failure be detected automatically in the next release? When the answer is yes, the correction should become a test rather than a memory.