openvibers/openvibe.rent Commits
/in and /fair have Markdown twins; llms.txt links them (#212)
Changes
@@@ -6,7 +6,8 @@// A twin is the page's own render: the host's page router answers the request in-process, signed out, so a twin// cannot drift from the page a browser gets and never carries a signed-in person's view. A page behind a person// (posting, a listing's edit form, the board, saved searches, the staff queue) or a missing listing has no twin.--const RENT_TWIN_PATH_RE = /^\/(?:everywhere|housing|listings(?:\/[^/]+)?|safety|updates)?$/;++// /in (the cities and a city's pages) and /fair (fair-housing rights) since 11-03: llms.txt listed them as HTML pages.++const RENT_TWIN_PATH_RE = /^\/(?:everywhere|fair|housing|in(?:\/[^/]+(?:\/[^/]+)?)?|listings(?:\/[^/]+)?|safety|updates)?$/;const HOMES_TWIN_PATH_RE = /^\/(?:search|records|mortgage|updates|in(?:\/[^/]+(?:\/[^/]+)?)?)?$/;/** A request as an anonymous browser makes it: no session, no cookies. */@@@ -100,8 +100,8 @@ function createDiscoveryRoutes(ctx) {{ title: 'Start here', links: [{ title: 'OpenVibe.Rent', url: abs('/'), note: 'find something to rent, or offer your own' },{ title: 'Search every rental site', url: abs('/everywhere'), note: 'one place and filters open Craigslist, Facebook Marketplace, Zillow, Apartments.com, Zumper and more at once' },-- { title: 'Rent by city', url: abs('/in'), html: true, note: 'typical rents by size in 885 US cities (Census ACS), with every rental site\'s search for each city' },-- { title: 'Is this rent fair?', url: abs('/fair'), html: true, note: 'a quoted monthly rent against the city\'s median for that size' },++ { title: 'Rent by city', url: abs('/in'), note: 'typical rents by size in 885 US cities (Census ACS), with every rental site\'s search for each city' },++ { title: 'Is this rent fair?', url: abs('/fair'), note: 'a quoted monthly rent against the city\'s median for that size' },{ title: 'Affordable housing', url: abs('/housing'), note: 'public housing, LIHTC and HUD-assisted properties, and where to apply, near you' },{ title: 'Listings', url: abs('/listings'), note: 'search by kind, city, country, price and period' },{ title: 'Renting safely', url: abs('/safety'), note: 'the rules, including the one about deposits' },@@@ -53,6 +53,15 @@ const PRIVATE = ['/auth/', '/api/'];assert.ok(r.text.startsWith('# OpenVibe.Rent'), 'no title');assert.ok(r.text.includes('(https://openvibe.rent/index.md)'), 'home link points at its Markdown twin');assert.ok(r.text.includes('(https://openvibe.rent/updates.md)'), 'no updates link');++ // 11-03: the cities and the fair-rent check have twins too.++ assert.ok(r.text.includes('(https://openvibe.rent/in.md)') && r.text.includes('(https://openvibe.rent/fair.md)'), 'cities and fair rent at their twins');++ const { RENT_TWIN_PATH_RE } = require('../server/agent-pages');++ assert.ok(['/in', '/in/ut', '/in/ut/salt-lake-city', '/fair'].every((p) => RENT_TWIN_PATH_RE.test(p)));++ for (const p of ['/in.md', '/fair.md']) {++ const twin = await t.get(p);++ assert.strictEqual(twin.status, 200, p);++ assert.match(twin.headers.get('content-type') || '', /^text\/markdown/, p);++ }assert.ok(r.text.includes('(https://openvibe.services)'), 'no pointer to the developer platform');assert.ok(r.text.includes('https://openvibe.rent/sitemap.xml'), 'sitemap not listed');assert.ok(r.text.includes('(https://openvibe.rent/llms-full.txt)'), 'llms-full.txt not listed');
@@ -6,7 +6,8 @@
@@ -6,7 +6,8 @@
// A twin is the page's own render: the host's page router answers the request in-process, signed out, so a twin
// A twin is the page's own render: the host's page router answers the request in-process, signed out, so a twin
// cannot drift from the page a browser gets and never carries a signed-in person's view. A page behind a person
// cannot drift from the page a browser gets and never carries a signed-in person's view. A page behind a person
// (posting, a listing's edit form, the board, saved searches, the staff queue) or a missing listing has no twin.
// (posting, a listing's edit form, the board, saved searches, the staff queue) or a missing listing has no twin.
-const RENT_TWIN_PATH_RE = /^\/(?:everywhere|housing|listings(?:\/[^/]+)?|safety|updates)?$/;
+// /in (the cities and a city's pages) and /fair (fair-housing rights) since 11-03: llms.txt listed them as HTML pages.
+const RENT_TWIN_PATH_RE = /^\/(?:everywhere|fair|housing|in(?:\/[^/]+(?:\/[^/]+)?)?|listings(?:\/[^/]+)?|safety|updates)?$/;
const HOMES_TWIN_PATH_RE = /^\/(?:search|records|mortgage|updates|in(?:\/[^/]+(?:\/[^/]+)?)?)?$/;
const HOMES_TWIN_PATH_RE = /^\/(?:search|records|mortgage|updates|in(?:\/[^/]+(?:\/[^/]+)?)?)?$/;
/** A request as an anonymous browser makes it: no session, no cookies. */
/** A request as an anonymous browser makes it: no session, no cookies. */
@@ -100,8 +100,8 @@ function createDiscoveryRoutes(ctx) {
@@ -100,8 +100,8 @@ function createDiscoveryRoutes(ctx) {
{ title: 'Start here', links: [
{ title: 'Start here', links: [
{ title: 'OpenVibe.Rent', url: abs('/'), note: 'find something to rent, or offer your own' },
{ title: 'OpenVibe.Rent', url: abs('/'), note: 'find something to rent, or offer your own' },
{ title: 'Search every rental site', url: abs('/everywhere'), note: 'one place and filters open Craigslist, Facebook Marketplace, Zillow, Apartments.com, Zumper and more at once' },
{ title: 'Search every rental site', url: abs('/everywhere'), note: 'one place and filters open Craigslist, Facebook Marketplace, Zillow, Apartments.com, Zumper and more at once' },
- { title: 'Rent by city', url: abs('/in'), html: true, note: 'typical rents by size in 885 US cities (Census ACS), with every rental site\'s search for each city' },
- { title: 'Is this rent fair?', url: abs('/fair'), html: true, note: 'a quoted monthly rent against the city\'s median for that size' },
+ { title: 'Rent by city', url: abs('/in'), note: 'typical rents by size in 885 US cities (Census ACS), with every rental site\'s search for each city' },
+ { title: 'Is this rent fair?', url: abs('/fair'), note: 'a quoted monthly rent against the city\'s median for that size' },
{ title: 'Affordable housing', url: abs('/housing'), note: 'public housing, LIHTC and HUD-assisted properties, and where to apply, near you' },
{ title: 'Affordable housing', url: abs('/housing'), note: 'public housing, LIHTC and HUD-assisted properties, and where to apply, near you' },
{ title: 'Listings', url: abs('/listings'), note: 'search by kind, city, country, price and period' },
{ title: 'Listings', url: abs('/listings'), note: 'search by kind, city, country, price and period' },
{ title: 'Renting safely', url: abs('/safety'), note: 'the rules, including the one about deposits' },
{ title: 'Renting safely', url: abs('/safety'), note: 'the rules, including the one about deposits' },
@@ -53,6 +53,15 @@ const PRIVATE = ['/auth/', '/api/'];
@@ -53,6 +53,15 @@ const PRIVATE = ['/auth/', '/api/'];
assert.ok(r.text.startsWith('# OpenVibe.Rent'), 'no title');
assert.ok(r.text.startsWith('# OpenVibe.Rent'), 'no title');
assert.ok(r.text.includes('(https://openvibe.rent/index.md)'), 'home link points at its Markdown twin');
assert.ok(r.text.includes('(https://openvibe.rent/index.md)'), 'home link points at its Markdown twin');
assert.ok(r.text.includes('(https://openvibe.rent/updates.md)'), 'no updates link');
assert.ok(r.text.includes('(https://openvibe.rent/updates.md)'), 'no updates link');
+ // 11-03: the cities and the fair-rent check have twins too.
+ assert.ok(r.text.includes('(https://openvibe.rent/in.md)') && r.text.includes('(https://openvibe.rent/fair.md)'), 'cities and fair rent at their twins');
+ const { RENT_TWIN_PATH_RE } = require('../server/agent-pages');
+ assert.ok(['/in', '/in/ut', '/in/ut/salt-lake-city', '/fair'].every((p) => RENT_TWIN_PATH_RE.test(p)));
+ for (const p of ['/in.md', '/fair.md']) {
+ const twin = await t.get(p);
+ assert.strictEqual(twin.status, 200, p);
+ assert.match(twin.headers.get('content-type') || '', /^text\/markdown/, p);
+ }
assert.ok(r.text.includes('(https://openvibe.services)'), 'no pointer to the developer platform');
assert.ok(r.text.includes('(https://openvibe.services)'), 'no pointer to the developer platform');
assert.ok(r.text.includes('https://openvibe.rent/sitemap.xml'), 'sitemap not listed');
assert.ok(r.text.includes('https://openvibe.rent/sitemap.xml'), 'sitemap not listed');
assert.ok(r.text.includes('(https://openvibe.rent/llms-full.txt)'), 'llms-full.txt not listed');
assert.ok(r.text.includes('(https://openvibe.rent/llms-full.txt)'), 'llms-full.txt not listed');