export type Post = { slug: string; title: string; excerpt: string; date: string; author: string; tags: string[]; body: string; draft?: boolean; }; /** Static content — a ready-app ships demo posts; replace with a CMS or MDX collection. */ export const POSTS: Post[] = [ { slug: 'launch-checklist', title: 'The 12-point launch checklist', excerpt: 'Everything to verify before you point a domain at your new site.', date: '2026-01-12', author: 'Acme Team', tags: ['launch', 'seo'], body: `A launch is not a deploy — it is a sequence of checks that keep a bad first impression off the record. ## Before you ship Confirm metadata, sitemap, robots, and a working contact form. Verify the 404 page and the empty states. ## After you ship Submit the sitemap, check the RSS feed, and watch the error logs for the first hour.`, }, { slug: 'seo-basics', title: 'SEO basics every landing page needs', excerpt: 'Metadata, JSON-LD and a sitemap — the three things search engines actually read.', date: '2026-01-20', author: 'Acme Team', tags: ['seo', 'marketing'], body: `Search engines reward pages that describe themselves. Start with a title, a description and canonical URLs. ## Structured data Add JSON-LD for your organization and your FAQ. It is cheap and it shows up in results. ## Feeds A sitemap and an RSS feed are the fastest way to get discovered.`, }, { slug: 'conversion-copy', title: 'Writing copy that converts', excerpt: 'How to turn a feature list into a benefit-led hero.', date: '2026-02-02', author: 'Acme Team', tags: ['marketing'], body: `Lead with the outcome, not the feature. "Ship faster" beats "CI included". ## One idea per section Every section should do one job and end with a next step. ## Prove it Add a testimonial or a number wherever the reader might doubt you.`, }, ]; export function publishedPosts(): Post[] { return POSTS.filter((p) => !p.draft).sort((a, b) => (a.date < b.date ? 1 : -1)); } export function getPost(slug: string): Post | undefined { return POSTS.find((p) => p.slug === slug && !p.draft); } export function readingMinutes(body: string): number { return Math.max(1, Math.round(body.split(/\s+/).length / 200)); }