@ai-growth/nextjs
Version:
Seamlessly integrate Sanity CMS with Next.js applications for automated blog routing and rendering
94 lines • 2.87 kB
TypeScript
/**
* @fileoverview Content Analysis Utilities for SEO
*
* This module provides functions for analyzing content to determine
* appropriate SEO characteristics, schema types, and indexing rules.
*/
import { ContentTypeResult } from '../../types/seo';
import { SanityPost, SanityPage } from '../../types/sanity';
/**
* Analyze content to determine SEO characteristics
*
* @param content - Content data to analyze
* @param template - Template hint for content type
* @returns Content analysis result
*/
export declare function analyzeContent(content?: SanityPost | SanityPage | any, template?: string): ContentTypeResult;
/**
* Analyze a blog post for SEO characteristics
*
* @param post - Post data
* @returns Content analysis result
*/
export declare function analyzePost(post: SanityPost): ContentTypeResult;
/**
* Analyze a page for SEO characteristics
*
* @param page - Page data
* @returns Content analysis result
*/
export declare function analyzePage(page: SanityPage): ContentTypeResult;
/**
* Analyze an author for SEO characteristics
*
* @param author - Author data
* @returns Content analysis result
*/
export declare function analyzeAuthor(author: any): ContentTypeResult;
/**
* Analyze a category for SEO characteristics
*
* @param category - Category data
* @returns Content analysis result
*/
export declare function analyzeCategory(category: any): ContentTypeResult;
/**
* Analyze generic content for SEO characteristics
*
* @param content - Generic content data
* @returns Content analysis result
*/
export declare function analyzeGenericContent(content: any): ContentTypeResult;
/**
* Determine the appropriate Schema.org article type
*
* @param post - Post data
* @returns Schema.org article type
*/
export declare function determineArticleSchemaType(post: SanityPost): string;
/**
* Check if content should be indexed by search engines
*
* @param content - Content to check
* @param contentAnalysis - Content analysis result
* @returns Whether content should be indexed
*/
export declare function shouldIndexContent(content: any, contentAnalysis: ContentTypeResult): boolean;
/**
* Determine content freshness for SEO
*
* @param content - Content to analyze
* @returns Content freshness information
*/
export declare function analyzeContentFreshness(content: any): {
isRecent: boolean;
daysSincePublished: number;
daysSinceModified: number;
needsUpdate: boolean;
};
/**
* Extract content quality indicators for SEO
*
* @param content - Content to analyze
* @returns Quality indicators
*/
export declare function analyzeContentQuality(content: any): {
hasImage: boolean;
hasDescription: boolean;
hasCategories: boolean;
hasAuthor: boolean;
wordCount: number;
readingTime: number;
qualityScore: number;
};
//# sourceMappingURL=content-analysis.d.ts.map