openvibers/openvibe.network Commits

SEO-8: the network's front door and /stats state they may be indexed (#407)

OP OpenVibers committed 15 days ago · 0cda6a82d5 · 3 files, +10 −0

Neither page said anything about indexing: public/index.html (the home's shell) and the /stats
head had a title, a description, a canonical and an OG card, but no <meta name="robots">, so the
most important page in the network relied on a crawler's implicit default — and on a layout that
sets noindex elsewhere in the network.

Both now say <meta name="robots" content="index, follow">. test/seo-routes.test.js asserts it in
the served head of / and /stats, next to the sitemap and llms-full checks.

Changes

ddiff --git a/public/index.html b/public/index.html
iindex 0c0a777c..8724f1c3 100644
---- a/public/index.html
++++ b/public/index.html
@@@ -10,6 +10,7 @@
<link rel="apple-touch-icon" href="/assets/logo-192.png">
<link rel="manifest" href="/manifest.webmanifest">
<meta name="description" content="One free account for every OpenVibe site: go live from your browser, online tools, chat, games, videos, jobs and an open platform to build on.">
++<meta name="robots" content="index, follow">
<meta name="keywords" content="openvibe, openvibe network, go live from browser, online tools, open source platform, single sign-on, developer platform">
<meta property="og:type" content="website">
<meta property="og:url" content="https://openvibe.network/">
ddiff --git a/server/stats/open.js b/server/stats/open.js
iindex 719a74ea..23660559 100644
---- a/server/stats/open.js
++++ b/server/stats/open.js
@@@ -316,6 +316,7 @@ ${s.daily ? sparkline(s.daily) : '<span class="os-site-own">counts its own visit
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${esc(title)} · OpenVibe.Network</title>
<meta name="description" content="${esc(desc)}">
++<meta name="robots" content="index, follow">
<link rel="canonical" href="https://openvibe.network/stats${days === 30 ? '' : `?days=${days}`}">
<link rel="alternate" type="application/json" href="/api/v1/stats?days=${days}" title="These numbers as JSON">
<meta property="og:title" content="${esc(title)}"><meta property="og:description" content="${esc(desc)}"><meta property="og:type" content="website">
ddiff --git a/test/seo-routes.test.js b/test/seo-routes.test.js
iindex f00204c8..665d4d27 100644
---- a/test/seo-routes.test.js
++++ b/test/seo-routes.test.js
@@@ -72,6 +72,14 @@ const cache = require('openvibe-shared/cache-policy');
assert.ok(Buffer.byteLength(fullBody) <= render.LLMS_FULL_MAX_BYTES, 'llms-full.txt stays within maxBytes');
assert.strictEqual(render.LLMS_FULL_MAX_BYTES, 512 * 1024);
++ // ── the front door and /stats state they may be indexed (SEO-8) ──
++ for (const p of ['/', '/stats']) {
++ const page = await get(p);
++ assert.strictEqual(page.status, 200, `${p} answers`);
++ const head = page.body.slice(0, page.body.indexOf('</head>'));
++ assert.ok(/<meta name="robots" content="index,\s*follow">/.test(head), `${p} says index, follow instead of relying on the crawler's default`);
++ }
++
// ── IndexNow: no INDEXNOW_KEY → no key file ──
const KEY = require('crypto').randomBytes(16).toString('hex');
assert.strictEqual((await get(`/${KEY}.txt`)).status, 404, 'no key file is served without INDEXNOW_KEY');