mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-28 19:35:27 +08:00
feat(web): integrate ecosystem social preview images
This commit is contained in:
@@ -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 |
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user