openvibers/openvibe.media Commits

The home's structured data names what the page shows: the 12 cards its rail draws, and its visible heading (#281)

OP OpenVibers committed 11 days ago · 2cf8bd6ab2 · 2 files, +6 −3

Changes

ddiff --git a/server/public/browse.js b/server/public/browse.js
iindex a70fedb..80de9ae 100644
---- a/server/public/browse.js
++++ b/server/public/browse.js
@@@ -416,13 +416,15 @@ ${first ? foldBlock({ id: 'shipped', head: '<h2 id="shipped-h">Recently shipped
seo: {
title: TITLE, description: DESCRIPTION, canonical,
robots: page > 1 ? 'noindex, follow' : 'index, follow', ogType: 'website',
-- jsonLd: page === 1 ? [...browseJsonLd(tab, data.cards), ...(first ? [homeFaqJsonLd()] : [])] : [],
++ // The home's list names only the cards its rail draws (12); the release check needs a list's names on the page.
++ jsonLd: page === 1 ? [...browseJsonLd(tab, first ? data.cards.slice(0, 12) : data.cards), ...(first ? [homeFaqJsonLd()] : [])] : [],
},
css: BROWSE_CSS + (rules.length ? `@supports selector(:has(*)){@media (max-width:640px){${rules.join('')}}}` : ''),
kit: first,
body,
// Later pages are noindex and carry no structured data, the summary's WebPage included.
summary: page === 1 ? {
++ ...(first ? { name: 'Open media and object storage for OpenVibe and your apps' } : {}),
summary: 'Index of all public media on the OpenVibe network: videos, clips, emotes, sounds, files and thumbnails, browsable and playable without an account.',
url: canonical,
facts: [['Items', data.total.toLocaleString('en-US')]],
ddiff --git a/server/public/page-frame.js b/server/public/page-frame.js
iindex 78cdbdc..de38138 100644
---- a/server/public/page-frame.js
++++ b/server/public/page-frame.js
@@@ -197,7 +197,8 @@ function defaultFooterLinks() {
* the no-JavaScript nav and the shared footer; `history` and `footer` become the navbar init options
* and the server-rendered footer. The site's app icon, palette and Open Graph video tags ride in
* through the shell's `head`. `summary` is the page's AI summary (openvibe-shared/seo pageSummary): a
-- * string, or { summary, url, facts: [[label, value]], updated }; the url defaults to the canonical.
++ * string, or { summary, url, facts: [[label, value]], updated, name }; the url defaults to the canonical, and name (the
++ * WebPage's name) to the title: give the page's visible heading when the title differs, as the release check reads it.
*/
function oneGraph(nodes) {
if (!nodes || ![].concat(nodes).length) return undefined;
@@@ -206,7 +207,7 @@ function oneGraph(nodes) {
function page({ seo, css = '', body, history, footer, summary, agentLayer = false, kit = false }) {
const sum = summary == null ? null : typeof summary === 'object' ? summary : { summary };
-- const summaryData = sum ? seoLib.pageSummary({ title: seo.title, summary: sum.summary, facts: sum.facts, url: sum.url || seo.canonical, updated: sum.updated }) : null;
++ const summaryData = sum ? seoLib.pageSummary({ title: seo.title, summary: sum.summary, facts: sum.facts, url: sum.url || seo.canonical, updated: sum.updated, ...(sum.name ? { title: sum.name } : {}) }) : null;
const html = shell.page({
name: SITE_NAME,
lang: 'en',