added admin dashboard
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { DEFAULT_SLOTS } from '$lib/content/defaults';
|
||||
import { analyzeCopy, aggregateScore } from '$lib/seo';
|
||||
import { getContent } from './content';
|
||||
|
||||
export function computeHealth(): { seo: number; geo: number } {
|
||||
const content = getContent();
|
||||
const analyses = DEFAULT_SLOTS
|
||||
.filter((s) => s.kind === 'multiline' || s.id.endsWith('_text'))
|
||||
.slice(0, 30)
|
||||
.map((s) => analyzeCopy(content.copy[s.id] ?? s.value, content.seo.primaryKeywords));
|
||||
return aggregateScore(analyses);
|
||||
}
|
||||
Reference in New Issue
Block a user