openvibers/openvibe.deals Commits

A title that names the site is not suffixed again (#201)

OP OpenVibers committed 11 days ago · b1d92083bf · 1 file, +2 −1

Changes

ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex 135dc5d..55b84d5 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -97,7 +97,8 @@ function renderPage(o) {
site: 'deals',
siteName: SITE_NAME,
lang: o.lang,
-- title: o.title ? `${o.title} · ${SITE_NAME}` : SITE_NAME,
++ // A title that already names the site is not suffixed again ("What shipped on OpenVibe.Deals · OpenVibe.Deals").
++ title: o.title ? (o.title.includes(SITE_NAME) ? o.title : `${o.title} · ${SITE_NAME}`) : SITE_NAME,
description: o.description || 'Deals submitted and voted on by the community, with source, price and freshness always shown.',
canonical: o.canonical,
decision: o.decision,