openvibers/openvibe.report Commits
/llms-full.txt (SEO-33): the site in full, from the same descriptor as llms.txt (#88)
Changes
@@@ -68,8 +68,8 @@ function createDiscoveryRoutes({ config, live, bench }) {res.type('application/xml').set('Cache-Control', CACHE).send(seo.sitemapXml(pages));});-- r.get('/llms.txt', (_req, res) => {-- res.type('text/plain').set('Cache-Control', CACHE).send(seo.llmsTxt({++ // The site as llms.txt describes it, shared by /llms.txt and /llms-full.txt (SEO-33).++ const llmsSite = () => ({name: SITE_NAME,summary: 'Every number on OpenVibe, honest: the network\'s open stats, The Rundown of what streamers talked about, and every stream\'s after-show report.',details: 'The numbers and the write-ups are read from OpenVibe.Network and OpenVibe.Live, cached in this process for a few minutes, and shown as the sources answer them. Nothing here is about a person.',@@@ -94,6 +94,19 @@ function createDiscoveryRoutes({ config, live, bench }) {{ title: 'OpenVibe.Live', url: 'https://openvibe.live', note: 'the streams, The Rundown and the after-show reports' },] },],++ });++ r.get('/llms.txt', (_req, res) => {++ res.type('text/plain').set('Cache-Control', CACHE).send(seo.llmsTxt(llmsSite()));++ });++ // The same, in full (SEO-33): what the site is, then every page llms.txt lists with what it holds.++ r.get('/llms-full.txt', (_req, res) => {++ const d = llmsSite();++ res.type('text/plain').set('Cache-Control', CACHE).send(seo.llmsFull({++ site: d.name, summary: d.summary, base: abs('/'),++ sections: [++ { title: 'About', pages: [{ title: d.name, url: abs('/'), text: [d.summary, d.details].filter(Boolean).join('\n\n') }] },++ ...(d.sections || []).map((x) => ({ title: x.title, pages: (x.links || []).map((l) => ({ title: l.title, url: l.url, text: l.note || '' })) })),++ ],}));});@@@ -55,6 +55,16 @@ const STATUS_UPDATED = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ST]) assert.ok(r.text.includes(`(${link})`), `missing link ${link}`);});++ await check('llms-full.txt (SEO-33): the site in full, every page llms.txt lists with what it holds', async () => {++ const r = await t.get('/llms-full.txt');++ assert.strictEqual(r.status, 200);++ assert.match(r.headers.get('content-type') || '', /^text\/plain/);++ assert.ok(r.text.startsWith('# OpenVibe.Report'));++ assert.ok(r.text.length > 500, `${r.text.length} characters`);++ assert.match(r.text, /## About\n\n### OpenVibe\.Report\n\nURL: https:\/\/openvibe\.report\/\n\nEvery number on OpenVibe, honest/);++ assert.match(r.text, /### Design health\n\nURL: https:\/\/openvibe\.report\/design\n\nhow closely each site follows/);++ });++await check('a topics source that answers nothing still leaves the three static sitemap pages', async () => {const empty = await boot({ data: { topics: null } });try {
@@ -68,8 +68,8 @@ function createDiscoveryRoutes({ config, live, bench }) {
@@ -68,8 +68,8 @@ function createDiscoveryRoutes({ config, live, bench }) {
res.type('application/xml').set('Cache-Control', CACHE).send(seo.sitemapXml(pages));
res.type('application/xml').set('Cache-Control', CACHE).send(seo.sitemapXml(pages));
});
});
- r.get('/llms.txt', (_req, res) => {
- res.type('text/plain').set('Cache-Control', CACHE).send(seo.llmsTxt({
+ // The site as llms.txt describes it, shared by /llms.txt and /llms-full.txt (SEO-33).
+ const llmsSite = () => ({
name: SITE_NAME,
name: SITE_NAME,
summary: 'Every number on OpenVibe, honest: the network\'s open stats, The Rundown of what streamers talked about, and every stream\'s after-show report.',
summary: 'Every number on OpenVibe, honest: the network\'s open stats, The Rundown of what streamers talked about, and every stream\'s after-show report.',
details: 'The numbers and the write-ups are read from OpenVibe.Network and OpenVibe.Live, cached in this process for a few minutes, and shown as the sources answer them. Nothing here is about a person.',
details: 'The numbers and the write-ups are read from OpenVibe.Network and OpenVibe.Live, cached in this process for a few minutes, and shown as the sources answer them. Nothing here is about a person.',
@@ -94,6 +94,19 @@ function createDiscoveryRoutes({ config, live, bench }) {
@@ -94,6 +94,19 @@ function createDiscoveryRoutes({ config, live, bench }) {
{ title: 'OpenVibe.Live', url: 'https://openvibe.live', note: 'the streams, The Rundown and the after-show reports' },
{ title: 'OpenVibe.Live', url: 'https://openvibe.live', note: 'the streams, The Rundown and the after-show reports' },
] },
] },
],
],
+ });
+ r.get('/llms.txt', (_req, res) => {
+ res.type('text/plain').set('Cache-Control', CACHE).send(seo.llmsTxt(llmsSite()));
+ });
+ // The same, in full (SEO-33): what the site is, then every page llms.txt lists with what it holds.
+ r.get('/llms-full.txt', (_req, res) => {
+ const d = llmsSite();
+ res.type('text/plain').set('Cache-Control', CACHE).send(seo.llmsFull({
+ site: d.name, summary: d.summary, base: abs('/'),
+ sections: [
+ { title: 'About', pages: [{ title: d.name, url: abs('/'), text: [d.summary, d.details].filter(Boolean).join('\n\n') }] },
+ ...(d.sections || []).map((x) => ({ title: x.title, pages: (x.links || []).map((l) => ({ title: l.title, url: l.url, text: l.note || '' })) })),
+ ],
}));
}));
});
});
@@ -55,6 +55,16 @@ const STATUS_UPDATED = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ST
@@ -55,6 +55,16 @@ const STATUS_UPDATED = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'ST
]) assert.ok(r.text.includes(`(${link})`), `missing link ${link}`);
]) assert.ok(r.text.includes(`(${link})`), `missing link ${link}`);
});
});
+ await check('llms-full.txt (SEO-33): the site in full, every page llms.txt lists with what it holds', async () => {
+ const r = await t.get('/llms-full.txt');
+ assert.strictEqual(r.status, 200);
+ assert.match(r.headers.get('content-type') || '', /^text\/plain/);
+ assert.ok(r.text.startsWith('# OpenVibe.Report'));
+ assert.ok(r.text.length > 500, `${r.text.length} characters`);
+ assert.match(r.text, /## About\n\n### OpenVibe\.Report\n\nURL: https:\/\/openvibe\.report\/\n\nEvery number on OpenVibe, honest/);
+ assert.match(r.text, /### Design health\n\nURL: https:\/\/openvibe\.report\/design\n\nhow closely each site follows/);
+ });
+
await check('a topics source that answers nothing still leaves the three static sitemap pages', async () => {
await check('a topics source that answers nothing still leaves the three static sitemap pages', async () => {
const empty = await boot({ data: { topics: null } });
const empty = await boot({ data: { topics: null } });
try {
try {