added admin dashboard

This commit is contained in:
2026-04-20 12:48:58 +02:00
parent 6145775922
commit d3f740cfa9
56 changed files with 4438 additions and 669 deletions
+12
View File
@@ -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);
}