--- import BaseLayout from './BaseLayout.astro'; import GiscusComments from '../components/GiscusComments.astro'; interface Props { title: string; description: string; pubDate: Date; updatedDate?: Date; author: string; tags?: string[]; heroImage?: string; } const { title, description, pubDate, updatedDate, author, tags = [], heroImage } = Astro.props; const formattedDate = pubDate.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric', }); const formattedUpdatedDate = updatedDate?.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric', }); const AUTHOR_AVATAR_URL = 'https://avatars.githubusercontent.com/u/1503032'; const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString(); const blogPostSchema = { '@context': 'https://schema.org', '@type': 'BlogPosting', headline: title, description, datePublished: pubDate.toISOString(), dateModified: (updatedDate ?? pubDate).toISOString(), author: { '@type': 'Person', name: author, url: 'https://github.com/4gray', }, publisher: { '@type': 'Organization', name: 'IPTVnator', url: 'https://4gray.github.io/iptvnator/', logo: { '@type': 'ImageObject', url: 'https://4gray.github.io/iptvnator/favicon-256x256.png', }, }, mainEntityOfPage: canonicalURL, image: heroImage ? new URL(heroImage, Astro.site).toString() : undefined, }; ---
Back to blog
{ tags.length > 0 && ( <> · {tags.map((tag) => ( {tag} ))} ) }

{title}

{description}

{`${author}
{author}
{ updatedDate && (
Updated {formattedUpdatedDate}
) }

{heroImage && (
)}