openvibers/openvibe.games Commits
Add Organization JSON-LD to the home page (#244)
Changes
@@@ -232,6 +232,7 @@ describe('crawl artifacts (plan T11)', () => {]expect(blocks.map((b) => (JSON.parse(b[1] ?? '{}') as { '@type'?: string })['@type'])).toEqual(['WebSite',++ 'Organization','WebApplication',// Vibe Heroes, the casual line's first game (plan T22).'WebApplication',@@@ -239,7 +240,7 @@ describe('crawl artifacts (plan T11)', () => {])const nodes = blocks.map((b) => JSON.parse(b[1] ?? '{}') as Record<string, unknown>)expect(nodes[0]?.['url']).toBe('https://openvibe.games')-- expect(nodes[1]?.['applicationCategory']).toBe('GameApplication')++ expect(nodes[2]?.['applicationCategory']).toBe('GameApplication')// Nothing private or per-user in the served nodes.const text = JSON.stringify(nodes)for (const p of PRIVATE) expect(text).not.toContain(p)@@@ -64,6 +64,7 @@ interface SeoToolkit {sitemapXml(urls: SeoUrl[]): stringjsonLd: {website(o: { name: string; url: string; description: string }): unknown++ organization(o?: Record<string, unknown>): unknownsoftwareApp(o: {name: stringurl: string@@@ -296,6 +297,7 @@ function llmsFullBody(): string {export function homeJsonLd(): unknown[] {return [seo.jsonLd.website({ name: SITE_NAME, url: SITE, description: DESCRIPTION }),++ seo.jsonLd.organization(),seo.jsonLd.softwareApp({name: 'Scraplandia',url: `${PLAY}/`,
@@ -232,6 +232,7 @@ describe('crawl artifacts (plan T11)', () => {
@@ -232,6 +232,7 @@ describe('crawl artifacts (plan T11)', () => {
]
]
expect(blocks.map((b) => (JSON.parse(b[1] ?? '{}') as { '@type'?: string })['@type'])).toEqual([
expect(blocks.map((b) => (JSON.parse(b[1] ?? '{}') as { '@type'?: string })['@type'])).toEqual([
'WebSite',
'WebSite',
+ 'Organization',
'WebApplication',
'WebApplication',
// Vibe Heroes, the casual line's first game (plan T22).
// Vibe Heroes, the casual line's first game (plan T22).
'WebApplication',
'WebApplication',
@@ -239,7 +240,7 @@ describe('crawl artifacts (plan T11)', () => {
@@ -239,7 +240,7 @@ describe('crawl artifacts (plan T11)', () => {
])
])
const nodes = blocks.map((b) => JSON.parse(b[1] ?? '{}') as Record<string, unknown>)
const nodes = blocks.map((b) => JSON.parse(b[1] ?? '{}') as Record<string, unknown>)
expect(nodes[0]?.['url']).toBe('https://openvibe.games')
expect(nodes[0]?.['url']).toBe('https://openvibe.games')
- expect(nodes[1]?.['applicationCategory']).toBe('GameApplication')
+ expect(nodes[2]?.['applicationCategory']).toBe('GameApplication')
// Nothing private or per-user in the served nodes.
// Nothing private or per-user in the served nodes.
const text = JSON.stringify(nodes)
const text = JSON.stringify(nodes)
for (const p of PRIVATE) expect(text).not.toContain(p)
for (const p of PRIVATE) expect(text).not.toContain(p)
@@ -64,6 +64,7 @@ interface SeoToolkit {
@@ -64,6 +64,7 @@ interface SeoToolkit {
sitemapXml(urls: SeoUrl[]): string
sitemapXml(urls: SeoUrl[]): string
jsonLd: {
jsonLd: {
website(o: { name: string; url: string; description: string }): unknown
website(o: { name: string; url: string; description: string }): unknown
+ organization(o?: Record<string, unknown>): unknown
softwareApp(o: {
softwareApp(o: {
name: string
name: string
url: string
url: string
@@ -296,6 +297,7 @@ function llmsFullBody(): string {
@@ -296,6 +297,7 @@ function llmsFullBody(): string {
export function homeJsonLd(): unknown[] {
export function homeJsonLd(): unknown[] {
return [
return [
seo.jsonLd.website({ name: SITE_NAME, url: SITE, description: DESCRIPTION }),
seo.jsonLd.website({ name: SITE_NAME, url: SITE, description: DESCRIPTION }),
+ seo.jsonLd.organization(),
seo.jsonLd.softwareApp({
seo.jsonLd.softwareApp({
name: 'Scraplandia',
name: 'Scraplandia',
url: `${PLAY}/`,
url: `${PLAY}/`,