[dyad] Removed @graph from schema results - wrote 1 file(s)

This commit is contained in:
[dyad]
2026-01-20 15:06:19 +01:00
parent 80a88e20f2
commit bfd3c6c89d

View File

@@ -64,10 +64,10 @@ export async function extractMetaData(url: string, keyword?: string) {
try { try {
const data = JSON.parse(jsonContent); const data = JSON.parse(jsonContent);
schemaData.push(data);
const graph = data["@graph"] || [data]; const graph = data["@graph"] || [data];
schemaData.push(...graph);
for (const item of graph) { for (const item of graph) {
if (item["@type"] === "FAQPage" && Array.isArray(item.mainEntity)) { if (item["@type"] === "FAQPage" && Array.isArray(item.mainEntity)) {
item.mainEntity.forEach((qa: any) => { item.mainEntity.forEach((qa: any) => {