openvibers/openvibe.coupons Commits

Coupons: the front page's title says what the site is (#48)

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

The front page's <title> was the bare site name. It now says what the site is ("OpenVibe.Coupons: coupon codes with honest expiry"), 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.Coupons".

The full suite passes.

Changes

ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex d201f97..a6209b0 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -70,7 +70,8 @@ function renderPage(o) {
return layout.renderDocument({
site: 'coupons',
siteName: SITE_NAME,
-- 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.Coupons".
++ title: o.title ? `${o.title} · ${SITE_NAME}` : o.path === '/' ? `${SITE_NAME}: coupon codes with honest expiry` : SITE_NAME,
description: o.description || 'Coupon codes with merchant matching, restrictions, honest expiry and people\'s validity reports.',
canonical: o.canonical,
decision: o.decision,