openvibers/openvibe.connect Commits
Front door: carry the site entity as JSON-LD (#116)
Changes
@@@ -10,6 +10,7 @@ const fs = require('fs');const path = require('path');const appIcon = require('openvibe-shared/app-icon');const shell = require('openvibe-shared/shell');++const seo = require('openvibe-shared/seo');const rooms = require('openvibe-shared/rooms');const ovServe = require('openvibe-shared/serve');const cache = require('openvibe-shared/cache-policy');@@@ -77,7 +78,7 @@ function layout(o) {description: o.description || `${SITE_NAME}: ${TAGLINE} Share one port on your computer at its own address, behind OpenVibe sign-in.`,canonical,robots: o.robots || (o.index ? 'index, follow' : 'noindex, follow'),-- jsonLd: (o.jsonLd || []).filter(Boolean),++ jsonLd: (o.jsonLd || [seo.jsonLd.website({ name: SITE_NAME, url: `${config.baseUrl}/`, description: `${SITE_NAME}: ${TAGLINE}` })]).filter(Boolean),home: '/',navLinks: NAV,navbar,@@@ -21,6 +21,8 @@ const { check, done } = require('./helpers/check');assert.match(r.text, /Sign in to make a share/);assert.ok(!r.text.includes('action="/shares"'));assert.match(r.text, /<meta name="robots" content="index, follow"/);++ assert.match(r.text, /<script type="application\/ld\+json">[^<]*"@type":"WebSite"/, 'the front door carries the site entity');++ assert.match(r.text, /"name":"OpenVibe Connect"/);});await check('signed in: your shares and the form, with your own address in it', async () => {
@@ -10,6 +10,7 @@ const fs = require('fs');
@@ -10,6 +10,7 @@ const fs = require('fs');
const path = require('path');
const path = require('path');
const appIcon = require('openvibe-shared/app-icon');
const appIcon = require('openvibe-shared/app-icon');
const shell = require('openvibe-shared/shell');
const shell = require('openvibe-shared/shell');
+const seo = require('openvibe-shared/seo');
const rooms = require('openvibe-shared/rooms');
const rooms = require('openvibe-shared/rooms');
const ovServe = require('openvibe-shared/serve');
const ovServe = require('openvibe-shared/serve');
const cache = require('openvibe-shared/cache-policy');
const cache = require('openvibe-shared/cache-policy');
@@ -77,7 +78,7 @@ function layout(o) {
@@ -77,7 +78,7 @@ function layout(o) {
description: o.description || `${SITE_NAME}: ${TAGLINE} Share one port on your computer at its own address, behind OpenVibe sign-in.`,
description: o.description || `${SITE_NAME}: ${TAGLINE} Share one port on your computer at its own address, behind OpenVibe sign-in.`,
canonical,
canonical,
robots: o.robots || (o.index ? 'index, follow' : 'noindex, follow'),
robots: o.robots || (o.index ? 'index, follow' : 'noindex, follow'),
- jsonLd: (o.jsonLd || []).filter(Boolean),
+ jsonLd: (o.jsonLd || [seo.jsonLd.website({ name: SITE_NAME, url: `${config.baseUrl}/`, description: `${SITE_NAME}: ${TAGLINE}` })]).filter(Boolean),
home: '/',
home: '/',
navLinks: NAV,
navLinks: NAV,
navbar,
navbar,
@@ -21,6 +21,8 @@ const { check, done } = require('./helpers/check');
@@ -21,6 +21,8 @@ const { check, done } = require('./helpers/check');
assert.match(r.text, /Sign in to make a share/);
assert.match(r.text, /Sign in to make a share/);
assert.ok(!r.text.includes('action="/shares"'));
assert.ok(!r.text.includes('action="/shares"'));
assert.match(r.text, /<meta name="robots" content="index, follow"/);
assert.match(r.text, /<meta name="robots" content="index, follow"/);
+ assert.match(r.text, /<script type="application\/ld\+json">[^<]*"@type":"WebSite"/, 'the front door carries the site entity');
+ assert.match(r.text, /"name":"OpenVibe Connect"/);
});
});
await check('signed in: your shares and the form, with your own address in it', async () => {
await check('signed in: your shares and the form, with your own address in it', async () => {