openvibers/openvibe.reviews Commits

Reviews: the front page's title says what the site is (#49)

OP OpenVibers committed 30 days ago · d069da2c1d · 1 file, +2 −1

The front page's <title> was the bare site name. It now says what the site is ("OpenVibe.Reviews: ratings from named, linked sources"), so search results and shared links read like a product. The shared layout cuts titles at 60 characters, so this one is short. Other pages keep "<page> · OpenVibe.Reviews".

The full suite passes.

Changes

ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex f40d3e4..9e8c8b7 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -64,7 +64,8 @@ function navConfig(o, config) {
function renderPage(o) {
const { config } = o;
if (!o.robots && !o.decision) throw new TypeError('renderPage needs explicit robots (or the gate decision)');
-- const 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.Reviews".
++ const title = o.title ? `${o.title} · ${SITE_NAME}` : o.path === '/' ? `${SITE_NAME}: ratings from named, linked sources` : SITE_NAME;
const feeds = [
{ type: 'atom', title: `${SITE_NAME}: published summaries (Atom)`, href: '/feed.atom' },
{ type: 'json', title: `${SITE_NAME}: published summaries (JSON Feed)`, href: '/feed.json' },