verifyStaticSite
functionVerifies a static build against an explicit site inventory. Reads only contained local artifact files, indexing each inspected HTML file once. Checks canonical metadata, robots indexability, links and fragments, and the discovery files the caller supplies.
verifyStaticSite(
options: IVerifyStaticSiteOptions,
): Promise<IStaticSiteVerification>Parameters
optionsIVerifyStaticSiteOptionsThe local artifact, production origin, page inventory and optional read limits.
Returns
Promise<IStaticSiteVerification>Verified pages and optional sitemap entries in document order.
Throws
INVALID_SITE_BUILD_OPTIONSThe site build verification options are invalid.SITE_BUILD_INVALIDThe static site build failed verification.
import { verifyStaticSite } from 'jg-site-checks';
await verifyStaticSite({
artifactRoot: 'dist',
origin: 'https://example.com',
pages: [{ path: '/', canonicalUrl: 'https://example.com/', indexable: true }],
discovery: { sitemap: '/sitemap.xml', robots: '/robots.txt' },
});