openvibers/openvibe.actor Commits

openvibe.actor's meta description fits a search result (166 characters, now 136) (#99)

OP OpenVibers committed 22 days ago · feb989eee6 · 2 files, +4 −1

Changes

ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex 5100f2f..8064e9d 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -81,7 +81,8 @@ function renderPage(o) {
title: o.title || `${SITE_NAME}: your agent for everything`,
titleSuffix: o.title ? ` · ${SITE_NAME}` : '',
siteName: SITE_NAME,
-- description: o.description || 'Give a task in plain words: Actor sends it to the best agent for it, OpenVibe\'s own or another platform\'s, checks the result and shows the cost and why. Like OpenRouter, for agents.',
++ // At most 160 characters, so search results show it whole.
++ description: o.description || 'Give a task in plain words. Actor picks the best agent for it, ours or another platform\'s, checks the answer and shows the cost and why.',
canonical,
robots: o.index ? 'index, follow' : 'noindex, nofollow',
jsonLd: (o.jsonLd || []).filter(Boolean),
ddiff --git a/test/home.test.js b/test/home.test.js
iindex 1bf7d15..0a3b1cf 100644
---- a/test/home.test.js
++++ b/test/home.test.js
@@@ -53,6 +53,8 @@ const { boot, check, done } = require('./helpers/boot');
assert.ok(shown.length >= 6);
assert.deepStrictEqual(ld.find((x) => x['@type'] === 'FAQPage').mainEntity.map((q) => q.name), shown);
assert.strictEqual((r.text.match(/<h1[ >]/g) || []).length, 1, 'one h1');
++ const description = /<meta name="description" content="([^"]*)"/.exec(r.text)[1].replace(/&#39;/g, "'");
++ assert.ok(description.length <= 160, `the description fits a search result (${description.length} characters)`);
});
await t.close();