feat: SEO schema, Word Count Goals, Internal Linking targets, and Admin UI updates

This commit is contained in:
cawcenter
2025-12-12 23:36:22 -05:00
parent f6041af538
commit ad1e1705b7
8 changed files with 365 additions and 26 deletions

View File

@@ -218,6 +218,34 @@ export async function fetchGeneratedArticles(
}
}
/**
* Fetch a single generated article by slug
*/
export async function fetchGeneratedArticleBySlug(
slug: string,
siteId: string
): Promise<any | null> {
try {
const articles = await directus.request(
readItems('generated_articles', {
filter: {
_and: [
{ slug: { _eq: slug } },
{ site: { _eq: siteId } },
{ is_published: { _eq: true } }
]
},
limit: 1,
fields: ['*']
})
);
return articles?.[0] || null;
} catch (err) {
console.error('Error fetching generated article:', err);
return null;
}
}
/**
* Fetch SEO campaigns
*/