feat(web): integrate ecosystem social preview images

This commit is contained in:
RockChinQ
2026-10-02 02:16:38 +00:00
parent bd47826f5a
commit 942ef7c788
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -20,12 +20,12 @@
"metatags": {
"og:site_name": "LangBot Docs",
"twitter:card": "summary_large_image",
"og:image": "https://langbot.app/docs/images/social/docs-v2.png",
"og:image": "https://langbot.app/docs/images/social/docs-v3.png",
"og:image:width": "1200",
"og:image:height": "630",
"og:image:type": "image/png",
"og:image:alt": "LangBot Docs — Build. Connect. Extend.",
"twitter:image": "https://langbot.app/docs/images/social/docs-v2.png",
"twitter:image": "https://langbot.app/docs/images/social/docs-v3.png",
"twitter:image:alt": "LangBot Docs — Build. Connect. Extend."
}
},
Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

+2 -2
View File
@@ -6,11 +6,11 @@ import path from "node:path";
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
test("share metadata references the branded versioned preview", () => {
for (const file of ['docs.json']) {
assert.ok(readFileSync(path.join(root, file), "utf8").includes('/images/social/docs-v2.png'), file);
assert.ok(readFileSync(path.join(root, file), "utf8").includes('/images/social/docs-v3.png'), file);
}
});
test("sharing PNG is a small 1200 by 630 image", () => {
const file = path.join(root, 'images/social/docs-v2.png');
const file = path.join(root, 'images/social/docs-v3.png');
assert.ok(existsSync(file), "branded image is present");
const png = readFileSync(file);
assert.equal(png.subarray(1, 4).toString(), "PNG");