openvibers/openvibe.zone Commits

Zone: the home page's meta description says what the site does (#13)

OP OpenVibers committed 29 days ago · 412c9da90a · 2 files, +4 −0

The home page's meta description was the layout's fallback, "OpenVibe.Zone — <tagline>" (35-49 characters). A metadata audit of every site flagged it as too short for search results.

- **Home:** it is now a sentence saying what the site does, under 160 characters.
- **/updates:** gets its own description instead of the same fallback.

The home test checks the description is 50-160 characters and is not "Name — tagline".

Changes

ddiff --git a/server/http/pages.js b/server/http/pages.js
iindex a1613ea..49947dd 100644
---- a/server/http/pages.js
++++ b/server/http/pages.js
@@@ -77,6 +77,7 @@ function createPageRoutes(ctx) {
});
page(req, res, {
index: true, cache: me ? null : PUBLIC_CACHE, jsonLd: homeJsonLd(config), styles: [showcase.STYLESHEET],
++ description: 'Private S3 buckets for your OpenVibe projects: create zones, issue access keys scoped to them, and use the AWS SDKs, rclone or any S3 tool.',
body: html`${raw(hero)}
${raw(showcase.steps({
title: 'From nothing to a bucket',
@@@ -309,6 +310,7 @@ ${keysSection}
r.get('/updates', (req, res) => page(req, res, {
index: true, cache: PUBLIC_CACHE,
title: `What shipped on ${SITE_NAME}`,
++ description: 'Every change deployed to OpenVibe.Zone, newest first, from the OpenVibe network\'s shared update log.',
body: raw(frame.updatesBody({ service: 'zone', siteName: SITE_NAME }) + `<script src="${ovServe.url('shipped.js')}" defer></script>`),
}));
ddiff --git a/test/layout.test.js b/test/layout.test.js
iindex 7acb123..bdfb2ad 100644
---- a/test/layout.test.js
++++ b/test/layout.test.js
@@@ -35,6 +35,8 @@ const BOOST = /<script src="\/shared\/boost\.js\?v=[0-9a-f]{12}" data-main="#mai
await check('the home page head comes from openvibe-shared/shell with the same title, canonical, robots and JSON-LD', async () => {
const r = await t.get('/');
++ // The home's meta description is a sentence for search results (50-160 characters), not "Name — tagline".
++ { const d = (/<meta name="description" content="([^"]*)"/.exec(r.text) || [])[1] || ''; assert.ok(d.length >= 50 && d.length <= 160 && !d.includes(' — '), `home description: ${d}`); }
assert.strictEqual(r.status, 200);
const head = r.text.slice(0, r.text.indexOf('</head>'));
assert.strictEqual((r.text.match(/<title>/g) || []).length, 1, 'exactly one <title>');