openvibers/openvibe.wiki Commits
Wiki: the front page's title says what the site is (#48)
Changes
@@@ -83,7 +83,8 @@ function renderPage(o) {site: 'wiki',siteName: SITE_NAME,lang: 'en',-- title: o.title ? `${o.title} · ${SITE_NAME}` : SITE_NAME,++ // The front page's title says what the site is (search results show it); every other page is "<page> · OpenVibe.Wiki".++ title: o.title ? `${o.title} · ${SITE_NAME}` : o.path === '/' ? `${SITE_NAME}: wiki spaces with history and citations` : SITE_NAME,description: o.description || DEFAULT_DESCRIPTION,summary: o.summary,canonical: `${config.baseUrl}${o.path || '/'}`,@@@ -52,7 +52,7 @@ const robotsOf = (head) => /<meta name="robots" content="([^"]*)">/.exec(head)[1// The home page: indexable by an explicit robots string, plus the showcase kit's stylesheet.r = await H.req(h, 'GET', '/');let { head } = frameOf(r.text, '/');-- assert.ok(head.includes('<title>OpenVibe.Wiki</title>'), 'the home title is the site name');++ assert.ok(head.includes('<title>OpenVibe.Wiki: wiki spaces with history and citations</title>'), `the home title says what the site is: ${(/<title>[^<]*<\/title>/.exec(head) || [''])[0]}`);assert.ok(/<link rel="canonical" href="https?:\/\/[^"\/]+\/">/.test(head), 'the home canonical');assert.strictEqual(robotsOf(head), 'index, follow');assert.ok(/<link rel="stylesheet" href="\/shared\/[^"]*showcase[^"]*">/.test(head), 'the extra openvibe-shared stylesheet');
@@ -83,7 +83,8 @@ function renderPage(o) {
@@ -83,7 +83,8 @@ function renderPage(o) {
site: 'wiki',
site: 'wiki',
siteName: SITE_NAME,
siteName: SITE_NAME,
lang: 'en',
lang: 'en',
- title: o.title ? `${o.title} · ${SITE_NAME}` : SITE_NAME,
+ // The front page's title says what the site is (search results show it); every other page is "<page> · OpenVibe.Wiki".
+ title: o.title ? `${o.title} · ${SITE_NAME}` : o.path === '/' ? `${SITE_NAME}: wiki spaces with history and citations` : SITE_NAME,
description: o.description || DEFAULT_DESCRIPTION,
description: o.description || DEFAULT_DESCRIPTION,
summary: o.summary,
summary: o.summary,
canonical: `${config.baseUrl}${o.path || '/'}`,
canonical: `${config.baseUrl}${o.path || '/'}`,
@@ -52,7 +52,7 @@ const robotsOf = (head) => /<meta name="robots" content="([^"]*)">/.exec(head)[1
@@ -52,7 +52,7 @@ const robotsOf = (head) => /<meta name="robots" content="([^"]*)">/.exec(head)[1
// The home page: indexable by an explicit robots string, plus the showcase kit's stylesheet.
// The home page: indexable by an explicit robots string, plus the showcase kit's stylesheet.
r = await H.req(h, 'GET', '/');
r = await H.req(h, 'GET', '/');
let { head } = frameOf(r.text, '/');
let { head } = frameOf(r.text, '/');
- assert.ok(head.includes('<title>OpenVibe.Wiki</title>'), 'the home title is the site name');
+ assert.ok(head.includes('<title>OpenVibe.Wiki: wiki spaces with history and citations</title>'), `the home title says what the site is: ${(/<title>[^<]*<\/title>/.exec(head) || [''])[0]}`);
assert.ok(/<link rel="canonical" href="https?:\/\/[^"\/]+\/">/.test(head), 'the home canonical');
assert.ok(/<link rel="canonical" href="https?:\/\/[^"\/]+\/">/.test(head), 'the home canonical');
assert.strictEqual(robotsOf(head), 'index, follow');
assert.strictEqual(robotsOf(head), 'index, follow');
assert.ok(/<link rel="stylesheet" href="\/shared\/[^"]*showcase[^"]*">/.test(head), 'the extra openvibe-shared stylesheet');
assert.ok(/<link rel="stylesheet" href="\/shared\/[^"]*showcase[^"]*">/.test(head), 'the extra openvibe-shared stylesheet');