UNPKG

astro-loader-hashnode

Version:

Astro content loader for seamlessly integrating Hashnode blog posts into your Astro website using the Content Layer API

93 lines (92 loc) 2.05 kB
/** * SEO metadata interface */ export interface SEOMetadata { title: string; description: string; canonical?: string; ogTitle?: string; ogDescription?: string; ogImage?: string; ogType?: string; twitterCard?: string; twitterTitle?: string; twitterDescription?: string; twitterImage?: string; keywords?: string[]; author?: string; publishedTime?: string; modifiedTime?: string; section?: string; tags?: string[]; } /** * Generate SEO metadata from post data */ export declare function generateSEOMetadata(data: { title: string; subtitle?: string; brief?: string; content?: string; url?: string; canonicalUrl?: string; coverImage?: { url: string; }; author?: { name: string; }; publishedAt?: Date; updatedAt?: Date; tags?: Array<{ name: string; }>; seo?: { title?: string; description?: string; }; }): SEOMetadata; /** * Optimize title for SEO (length and format) */ export declare function optimizeTitle(title: string, subtitle?: string): string; /** * Generate meta description from content */ export declare function generateMetaDescription(brief?: string, content?: string): string; /** * Generate keywords from content */ export declare function generateKeywords(title?: string, brief?: string, content?: string, tags?: Array<{ name: string; }>): string[]; /** * Generate JSON-LD structured data for blog post */ export declare function generateJSONLD(data: { title: string; description: string; url: string; coverImage?: { url: string; }; author: { name: string; url?: string; }; publishedAt: Date; updatedAt?: Date; organization?: { name: string; url: string; logo?: string; }; }): object; /** * Validate SEO metadata */ export declare function validateSEOMetadata(metadata: SEOMetadata): { isValid: boolean; warnings: string[]; errors: string[]; };