openvibers/openvibe.network Commits

The sitemap leaves out /status, a live page that says noindex, nofollow (#287)

OP OpenVibers committed 24 days ago · c876fc6808 · 3 files, +4 −5

Changes

ddiff --git a/server/home/render.js b/server/home/render.js
iindex b41ae191..c1bd927d 100644
---- a/server/home/render.js
++++ b/server/home/render.js
@@@ -246,13 +246,12 @@ function llmsTxt() {
// /llms-full.txt: the public pages the sitemap lists (server/seo/routes.js PAGES), each with its text.
const LLMS_PAGE_TEXT = {
'/': () => ['One OpenVibe account signs you in on every site:', ...OPEN.map((site) => `- ${siteName(site)} (https://${site.host}/): ${site.what}`)].join('\n'),
-- '/status': () => 'Observed status of each OpenVibe service: readiness, release and when it was last checked.',
'/updates': () => "Every change deployed to the OpenVibe network, newest first: each site's commits as they ship, and the Patch notes posts that gather them.",
'/terms': () => 'The rules for using OpenVibe.Network, in plain language.',
'/privacy': () => 'What OpenVibe.Network collects, why, and the choices you have.',
'/dmca': () => 'How to report copyright infringement on OpenVibe.Network, and how to respond to a report.',
};
--const LLMS_PAGE_TITLE = { '/': 'OpenVibe.Network', '/status': 'Status', '/updates': 'Updates', '/terms': 'Terms of Service', '/privacy': 'Privacy Policy', '/dmca': 'DMCA' };
++const LLMS_PAGE_TITLE = { '/': 'OpenVibe.Network', '/updates': 'Updates', '/terms': 'Terms of Service', '/privacy': 'Privacy Policy', '/dmca': 'DMCA' };
const LLMS_FULL_MAX_BYTES = 512 * 1024;
function llmsFullTxt({ baseUrl = 'https://openvibe.network' } = {}) {
ddiff --git a/server/seo/routes.js b/server/seo/routes.js
iindex de1b0e80..2ce0eb8c 100644
---- a/server/seo/routes.js
++++ b/server/seo/routes.js
@@@ -10,10 +10,10 @@ const HOST = 'https://openvibe.network';
// This is read once at boot if there is no release manifest.
const FALLBACK_LASTMOD = fs.statSync(path.join(__dirname, '../home/render.js')).mtime.toISOString();
--// Public HTML routes; sign-in, account and admin pages are omitted.
++// Public HTML routes; sign-in, account and admin pages are omitted, and so is /status: a live page that changes every
++// poll and says noindex, nofollow (status/routes.js), so listing it only spent crawl on a page engines skip.
const PAGES = [
{ path: '/', changefreq: 'daily', priority: 1.0 },
-- { path: '/status', changefreq: 'daily', priority: 0.8 },
{ path: '/updates', changefreq: 'daily', priority: 0.8 },
{ path: '/terms', changefreq: 'yearly', priority: 0.3 },
{ path: '/privacy', changefreq: 'yearly', priority: 0.3 },
ddiff --git a/test/seo-routes.test.js b/test/seo-routes.test.js
iindex f06c01f2..7f4230ec 100644
---- a/test/seo-routes.test.js
++++ b/test/seo-routes.test.js
@@@ -44,7 +44,7 @@ const cache = require('openvibe-shared/cache-policy');
assert.ok(sitemap.body.includes('<lastmod>'), 'every entry carries a lastmod');
const locs = [...sitemap.body.matchAll(/<loc>([^<]+)<\/loc>/g)].map(m => m[1]);
assert.deepStrictEqual(locs, seoRoutes.PAGES.map(p => `${seoRoutes.HOST}${p.path}`), 'the sitemap lists exactly the public HTML pages');
-- assert.ok(locs.includes('https://openvibe.network/status'), 'the sitemap lists the status page');
++ assert.ok(!locs.includes('https://openvibe.network/status'), 'not the status page: live, and noindex');
assert.ok(!locs.some(l => /\/admin|\/login/.test(l)), 'private pages are not in the sitemap');
const lastmods = new Set([...sitemap.body.matchAll(/<lastmod>([^<]+)<\/lastmod>/g)].map(m => m[1]));
assert.strictEqual(lastmods.size, 1, 'one lastmod for the whole sitemap');