/** * Content metadata component with visible last updated and author information * Supports sitemap synchronization for accurate lastmod dates */ import React from 'react'; import { Calendar, User, Clock } from 'lucide-react'; interface ContentMetaProps { lastUpdated: Date; authorName?: string; authorUrl?: string; publishedDate?: Date; readTime?: string; className?: string; } const ContentMeta: React.FC = ({ lastUpdated, authorName = 'EnergieProfis Redaktion', authorUrl = 'https://energie-profis.de/team', publishedDate, readTime, className = '' }) => { const formatDate = (date: Date): string => { return date.toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' }); }; const formatDateTime = (date: Date): string => { return date.toISOString(); }; return (
{/* Last Updated - Most important for AEO */}
Zuletzt aktualisiert:
{/* Author Information */}
Autor: {authorUrl ? ( {authorName} ) : ( {authorName} )}
{/* Published Date (if different from last updated) */} {publishedDate && publishedDate.getTime() !== lastUpdated.getTime() && (
Veröffentlicht:
)} {/* Read Time */} {readTime && (
{readTime} Lesezeit
)}
); }; export default ContentMeta;