openvibers/openvibe.markets Commits

SEO: crawlable by every bot; a sitemap (#15)

OP OpenVibers committed 10 days ago · 99eb0ea016 · 2 files, +8 −2

The owner (11-21): "Everything should be just crawlable." robots.txt closed /search and the API; it opens both (a
search reads OpenVibe Deals only, and its page stays noindex, follow), keeps out only sign-in, welcomes AI crawlers
(the Shared helper), and names a new sitemap. Test: app.

Changes

ddiff --git a/server/app.js b/server/app.js
iindex aca8b75..ece9f5c 100644
---- a/server/app.js
++++ b/server/app.js
@@@ -47,7 +47,11 @@ function createApp({ deals, vision = null, now = () => Date.now(), photoLimits =
});
app.get('/api/health', (_req, res) => res.json({ status: 'ok', service: 'markets' }));
app.get('/api/ready', (_req, res) => res.json({ status: 'ok', service: 'markets' }));
-- app.get('/robots.txt', (_req, res) => res.type('text').send('User-agent: *\nAllow: /$\nDisallow: /search\nDisallow: /api/\n'));
++ // Every page crawlable, by every bot, AI included (the owner, 2026-11-21: "Everything should be just crawlable"); a search
++ // here reads OpenVibe Deals only, so it is no cost to open. The site had no sitemap.
++ const seo = require('openvibe-shared/seo');
++ app.get('/robots.txt', (_req, res) => res.type('text').set('Cache-Control', 'public, max-age=3600').send(seo.robotsTxt({ disallow: ['/auth/'], sitemaps: ['https://openvibe.markets/sitemap.xml'] })));
++ app.get('/sitemap.xml', (_req, res) => res.type('application/xml').set('Cache-Control', 'public, max-age=3600').send(seo.sitemapXml([{ loc: 'https://openvibe.markets/', changefreq: 'daily', priority: 1.0 }])));
app.get('/llms.txt', (_req, res) => res.type('text').send([
'# OpenVibe.Markets', '', '> Every marketplace, one search: OpenVibe Deals\' offers (each price as of its time) and the big marketplaces opened with the search filled in.', '',
'- Search: https://openvibe.markets/search?q=<words>', '- API: GET https://openvibe.markets/api/v1/search?q=<words> → { q, deals: { ok, total, results }, elsewhere: [{ name, kind, url }] }', '',
ddiff --git a/test/app.test.js b/test/app.test.js
iindex 70eb085..8269601 100644
---- a/test/app.test.js
++++ b/test/app.test.js
@@@ -90,8 +90,10 @@ const OFFERS = [
assert.strictEqual(j.elsewhere.length, PLACES.length);
assert.strictEqual((await get('/api/v1/search')).status, 422);
++ // 2026-11-21: every page crawlable (a search page stays noindex, follow); a sitemap for the home.
r = await get('/robots.txt');
-- assert.match(r.text, /Disallow: \/search/);
++ assert.ok(!/Disallow: \/search/.test(r.text) && /Sitemap: https:\/\/openvibe\.markets\/sitemap\.xml/.test(r.text), r.text);
++ assert.match((await get('/sitemap.xml')).text, /<loc>https:\/\/openvibe\.markets\/<\/loc>/);
assert.match((await get('/llms.txt')).text, /OpenVibe\.Markets/);
assert.strictEqual((await get('/nope')).status, 404);