[dyad] Removed @graph from schema results - wrote 1 file(s)
This commit is contained in:
@@ -64,10 +64,10 @@ export async function extractMetaData(url: string, keyword?: string) {
|
||||
|
||||
try {
|
||||
const data = JSON.parse(jsonContent);
|
||||
schemaData.push(data);
|
||||
|
||||
const graph = data["@graph"] || [data];
|
||||
|
||||
schemaData.push(...graph);
|
||||
|
||||
for (const item of graph) {
|
||||
if (item["@type"] === "FAQPage" && Array.isArray(item.mainEntity)) {
|
||||
item.mainEntity.forEach((qa: any) => {
|
||||
|
||||
Reference in New Issue
Block a user