openvibers/openvibe.games Commits

Games: the home page description fits a search result (155 characters) (#82)

OP OpenVibers committed 29 days ago · d47e1b96f4 · 2 files, +8 −1

openvibe.games' home meta description was 262 characters, cut off in search results (a metadata audit of every site). It is now 155: the three games, what each is, and "no download". `pageIcon.test.ts` checks it stays between 50 and 160.

Changes

ddiff --git a/apps/client/index.html b/apps/client/index.html
iindex 80fe8e7..199eaa2 100644
---- a/apps/client/index.html
++++ b/apps/client/index.html
@@@ -7,7 +7,7 @@
<title>OpenVibe.Games — browser games on the OpenVibe network</title>
<meta
name="description"
-- content="The games arm of the OpenVibe network. Play Scraplandia, multiplayer survival-building in Scrap City; Salvage Rush, 90-second scrap-collecting rounds with a leaderboard; or Vibe Heroes, an idle hero collector for your phone. All in your browser with no download."
++ content="Play Scraplandia, Salvage Rush and Vibe Heroes in your browser: survival-building together, 90-second scrap rounds and an idle hero collector. No download."
/>
<!-- The OpenVibe Frame: the user's theme before first paint, then navbar + footer. -->
<!-- Deferred: a slow or unreachable openvibe.network never holds the first paint (the inline colours above cover it). -->
ddiff --git a/apps/client/src/pages/pageIcon.test.ts b/apps/client/src/pages/pageIcon.test.ts
iindex 29b1d84..744c9e0 100644
---- a/apps/client/src/pages/pageIcon.test.ts
++++ b/apps/client/src/pages/pageIcon.test.ts
@@@ -17,6 +17,13 @@ describe('page icon', () => {
expect(html).toContain('<link rel="icon" type="image/svg+xml" href="/favicon.svg" />')
})
++ it('the home page description fits a search result (at most 160 characters)', () => {
++ const html = readFileSync(client('index.html'), 'utf8')
++ const d = /name="description"\s+content="([^"]*)"/.exec(html)?.[1] ?? ''
++ expect(d.length).toBeGreaterThanOrEqual(50)
++ expect(d.length).toBeLessThanOrEqual(160)
++ })
++
it('public/favicon.svg exists and is an SVG', () => {
expect(existsSync(client('public/favicon.svg'))).toBe(true)
expect(readFileSync(client('public/favicon.svg'), 'utf8')).toMatch(