diff --git a/assets/og-image.png b/assets/og-image.png new file mode 100644 index 0000000..932c0c3 Binary files /dev/null and b/assets/og-image.png differ diff --git a/docs/index.html b/docs/index.html index 9ca98b7..27c8a35 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,6 +12,9 @@ + + + diff --git a/examples/index.html b/examples/index.html index 8fbe6fa..8814825 100644 --- a/examples/index.html +++ b/examples/index.html @@ -12,6 +12,9 @@ + + + diff --git a/index.html b/index.html index f6e3bcb..a4cd0f2 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,13 @@ + + + + + + + diff --git a/scripts/check.mjs b/scripts/check.mjs index 979e715..5b17a5a 100644 --- a/scripts/check.mjs +++ b/scripts/check.mjs @@ -20,6 +20,7 @@ const PAGES = [ const UTILITY = [{ path: "404.html", file: "404.html", type: "noindex,follow" }]; const REQUIRED_ASSETS = [ "assets/site.css", + "assets/og-image.png", "favicon.svg", "robots.txt", "sitemap.xml", @@ -248,6 +249,8 @@ function checkPage(page) { if (!/]+lang="en"/i.test(html)) fail(`${file}: missing lang="en"`); const viewport = meta(tags, "viewport") ?? ""; if (!viewport.includes("width=device-width")) fail(`${file}: bad viewport "${viewport}"`); + const ogImage = tags.find((tag) => tag.name === "meta" && tag.attrs.property?.toLowerCase() === "og:image")?.attrs.content; + if (ogImage !== `${SITE}/assets/og-image.png`) fail(`${file}: missing or unexpected og:image "${ogImage ?? ""}"`); if (titles.has(title)) fail(`${file}: duplicate title with ${titles.get(title)}`); else titles.set(title, file); diff --git a/security/index.html b/security/index.html index 472a753..031d27f 100644 --- a/security/index.html +++ b/security/index.html @@ -12,6 +12,9 @@ + + +