diff --git a/scripts/verify-discovery.mjs b/scripts/verify-discovery.mjs index fe4ac6b..717be97 100644 --- a/scripts/verify-discovery.mjs +++ b/scripts/verify-discovery.mjs @@ -88,6 +88,7 @@ for (const route of routes) { assert.equal(trail[1].item, `https://nestflow.art${route}`) } if (/\/about\/$/.test(route)) { + assert(local.includes(''), `${route}: identity answer must survive CDN email protection`) assert(typed('AboutPage'), `${route}: official identity page type missing`) assert.equal(typed('AboutPage').mainEntity?.['@id'], typed('SoftwareApplication')['@id'], `${route}: main identity must reference the official app`) assert(typed('SoftwareApplication').sameAs.includes('https://github.com/VelvetAbyss/Focus-Go')) diff --git a/scripts/verify-discovery.test.mjs b/scripts/verify-discovery.test.mjs index fc68511..b89eecd 100644 --- a/scripts/verify-discovery.test.mjs +++ b/scripts/verify-discovery.test.mjs @@ -40,3 +40,9 @@ test('rejects a Chinese page canonicalized to English', async t => { test('rejects an identity page whose main entity is an unrelated product', async t => { await assert.rejects(check(t, response => ({ ...response, html: response.route === '/about/' ? response.html.replace('"mainEntity":{"@id":"https://nestflow.art/#application"}', '"mainEntity":{"@id":"https://example.invalid/other"}') : response.html })), error => /main identity/.test(error.stderr)) }) + +test('keeps identity contact readable when CDN email protection runs', async t => { + const result = await check(t, response => ({ ...response, html: response.html.split(/([\s\S]*?)/g).map(part => part.startsWith('') ? part : part.replaceAll('support@nestflow.art', '[email protected]')).join('') })) + assert(result.stdout.includes('PASS discovery: /about/')) + assert(result.stdout.includes('PASS discovery: /zh/about/')) +}) diff --git a/scripts/website-pages.mjs b/scripts/website-pages.mjs index d893463..9bb25b8 100644 --- a/scripts/website-pages.mjs +++ b/scripts/website-pages.mjs @@ -31,7 +31,7 @@ export async function buildContentPages(output, release) { ${structuredData({ route, lang, title: c.title, description: c.description, breadcrumb: c.h1, application: true, pageType: page.pageType })}
-
${breadcrumbs(lang, route, c.h1)}
` +
${breadcrumbs(lang, route, c.h1)}
` const dir = path.join(output, route) await mkdir(dir, { recursive: true }) await writeFile(path.join(dir, 'index.html'), html)