openvibers/openvibe.coupons Commits

Structured data names list items as the page shows them (the release browser check failed the home's list) (#85)

OP OpenVibers committed 21 days ago · f47f8730b6 · 1 file, +1 −1

Changes

ddiff --git a/server/http/public.js b/server/http/public.js
iindex cd174ee..8d576cb 100644
---- a/server/http/public.js
++++ b/server/http/public.js
@@@ -166,7 +166,7 @@ function createPublicRoutes(ctx) {
feeds: [{ type: 'rss', href: '/feed.xml', title: 'New codes (RSS)' }, { type: 'atom', href: '/atom.xml', title: 'New codes (Atom)' }, { type: 'json', href: '/feed.json', title: 'New codes (JSON Feed)' }],
jsonLd: [
{ '@context': 'https://schema.org', '@type': 'WebSite', name: 'OpenVibe.Coupons', url: `${config.baseUrl}/`, potentialAction: { '@type': 'SearchAction', target: `${config.baseUrl}/?q={q}`, 'query-input': 'required name=q' } },
-- ...(listed.length ? [{ '@context': 'https://schema.org', '@type': 'ItemList', name: 'Coupon codes on OpenVibe.Coupons', itemListElement: listed.map((x, i) => ({ '@type': 'ListItem', position: i + 1, url: x.view.url, name: `${x.view.code}: ${x.view.title} at ${x.merchant.name}` })) }] : []),
++ ...(listed.length ? [{ '@context': 'https://schema.org', '@type': 'ItemList', name: 'Coupon codes on OpenVibe.Coupons', itemListElement: listed.map((x, i) => ({ '@type': 'ListItem', position: i + 1, url: x.view.url, name: x.view.title })) }] : []),
home.faqJsonLd(faq),
],
body: home.homePage({ now, stats, working, ending, recent, merchants: list, total: list.length, faq, windowDays: confidence.WINDOW_DAYS }),