--- import { getCollection } from 'astro:content'; import BaseLayout from '../layouts/BaseLayout.astro'; import Hero from '../components/Hero.astro'; import FeatureGrid from '../components/FeatureGrid.astro'; import ScreenshotShowcase from '../components/ScreenshotShowcase.astro'; import DownloadCTA from '../components/DownloadCTA.astro'; import SupportSection from '../components/SupportSection.astro'; import FeaturedBlogPost from '../components/FeaturedBlogPost.astro'; import BlogPostCard from '../components/BlogPostCard.astro'; const includeDrafts = import.meta.env.DEV || import.meta.env.PUBLIC_INCLUDE_DRAFTS === 'true'; const allPosts = (await getCollection('blog')) .filter((post) => includeDrafts || !post.data.draft) .sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()); const featuredPost = allPosts.find((post) => post.data.featured) ?? allPosts[0]; const otherPosts = featuredPost ? allPosts.filter((post) => post.id !== featuredPost.id).slice(0, 2) : []; const posts = featuredPost ? [featuredPost, ...otherPosts] : allPosts.slice(0, 3); const homeSchema = [ { '@context': 'https://schema.org', '@type': 'WebSite', name: 'IPTVnator', url: 'https://4gray.github.io/iptvnator/', description: 'A cross-platform IPTV player supporting M3U/M3U8 playlists, Xtream Codes API, and Stalker portals.', inLanguage: 'en', }, { '@context': 'https://schema.org', '@type': 'SoftwareApplication', name: 'IPTVnator', applicationCategory: 'MultimediaApplication', operatingSystem: 'Windows, macOS, Linux, Web', softwareVersion: '0.19.0', url: 'https://4gray.github.io/iptvnator/', downloadUrl: 'https://github.com/4gray/iptvnator/releases/latest', author: { '@type': 'Person', name: '4gray', url: 'https://github.com/4gray', }, sameAs: [ 'https://github.com/4gray/iptvnator', 'https://t.me/iptvnator', 'https://ko-fi.com/4gray', ], description: 'Open-source IPTV player with M3U/M3U8, Xtream Codes API, and Stalker portal support.', }, ]; --- { posts.length > 0 && (

Blog

Latest updates

Release notes, tutorials, and project updates.

{/* Featured post */} {featuredPost && (
)} {/* Other posts grid */} {otherPosts.length > 0 && (
{otherPosts.map((post) => ( ))}
)}
) }