openvibers/openvibe.zone Commits
Zone: the home page's meta description says what the site does (#13)
Changes
@@@ -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>`),}));@@@ -35,6 +35,8 @@ const BOOST = /<script src="\/shared\/boost\.js\?v=[0-9a-f]{12}" data-main="#maiawait 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>');
@@ -77,6 +77,7 @@ function createPageRoutes(ctx) {
@@ -77,6 +77,7 @@ function createPageRoutes(ctx) {
});
});
page(req, res, {
page(req, res, {
index: true, cache: me ? null : PUBLIC_CACHE, jsonLd: homeJsonLd(config), styles: [showcase.STYLESHEET],
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)}
body: html`${raw(hero)}
${raw(showcase.steps({
${raw(showcase.steps({
title: 'From nothing to a bucket',
title: 'From nothing to a bucket',
@@ -309,6 +310,7 @@ ${keysSection}
@@ -309,6 +310,7 @@ ${keysSection}
r.get('/updates', (req, res) => page(req, res, {
r.get('/updates', (req, res) => page(req, res, {
index: true, cache: PUBLIC_CACHE,
index: true, cache: PUBLIC_CACHE,
title: `What shipped on ${SITE_NAME}`,
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>`),
body: raw(frame.updatesBody({ service: 'zone', siteName: SITE_NAME }) + `<script src="${ovServe.url('shipped.js')}" defer></script>`),
}));
}));
@@ -35,6 +35,8 @@ const BOOST = /<script src="\/shared\/boost\.js\?v=[0-9a-f]{12}" data-main="#mai
@@ -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 () => {
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('/');
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);
assert.strictEqual(r.status, 200);
const head = r.text.slice(0, r.text.indexOf('</head>'));
const head = r.text.slice(0, r.text.indexOf('</head>'));
assert.strictEqual((r.text.match(/<title>/g) || []).length, 1, 'exactly one <title>');
assert.strictEqual((r.text.match(/<title>/g) || []).length, 1, 'exactly one <title>');