openvibers/openvibe.markets Commits
SEO: crawlable by every bot; a sitemap (#15)
Changes
@@@ -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 }] }', '',@@@ -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);
@@ -47,7 +47,11 @@ function createApp({ deals, vision = null, now = () => Date.now(), photoLimits =
@@ -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/health', (_req, res) => res.json({ status: 'ok', service: 'markets' }));
app.get('/api/ready', (_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([
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.', '',
'# 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 }] }', '',
'- 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 }] }', '',
@@ -90,8 +90,10 @@ const OFFERS = [
@@ -90,8 +90,10 @@ const OFFERS = [
assert.strictEqual(j.elsewhere.length, PLACES.length);
assert.strictEqual(j.elsewhere.length, PLACES.length);
assert.strictEqual((await get('/api/v1/search')).status, 422);
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');
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.match((await get('/llms.txt')).text, /OpenVibe\.Markets/);
assert.strictEqual((await get('/nope')).status, 404);
assert.strictEqual((await get('/nope')).status, 404);