--- import BaseLayout from './BaseLayout.astro'; import type { CollectionEntry } from 'astro:content'; type Props = { title: string; description: string; pubDate: Date; updatedDate?: Date; heroImage?: string; category?: string; tags?: string[]; draft?: boolean; }; const { title, description, pubDate, updatedDate, heroImage, category, tags, draft } = Astro.props; // Format date with time zone const formattedDate = pubDate ? new Date(pubDate).toLocaleDateString('en-us', { year: 'numeric', month: 'short', day: 'numeric', }) : ''; const formattedUpdatedDate = updatedDate ? new Date(updatedDate).toLocaleDateString('en-us', { year: 'numeric', month: 'short', day: 'numeric', }) : ''; // Social share URLs const pageUrl = Astro.url.href; const encodedUrl = encodeURIComponent(pageUrl); const encodedTitle = encodeURIComponent(title); const twitterShareUrl = `https://twitter.com/intent/tweet?url=${encodedUrl}&text=${encodedTitle}`; const linkedinShareUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${encodedUrl}`; const facebookShareUrl = `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}`; ---
{draft && (
Draft Post - Content may change
)} {heroImage && }

{title}

{formattedDate} {category && ( {category} )}
{updatedDate && (
Updated: {formattedUpdatedDate}
)}
{tags && tags.length > 0 && (
{tags.map(tag => ( #{tag} ))}
)}
Share this post:

Table of Contents

About the Author

DL
Daniel LaForce
DevOps & Infrastructure Engineer passionate about Kubernetes, automation, and self-hosting.
GitHub LinkedIn