NextJS SEO CLIne Prompt Author: Daniel Kliewer Date: 2025-10-18 Tags: NextJS, SEO, Vibe Coding, CLIne Description: CLIne prompt for NextJS SEO ---  I ran this in CLIne for this site and I honestly think it may have helped. I don't know. I don't really care anymore. All I know is that it did not break it. ``` Core Objectives Add and refine SEO metadata for every page and post. Improve semantic HTML and add structured data (JSON-LD). Optimize images, fonts, performance & Core Web Vitals. Generate and configure sitemap and robots.txt. Ensure clean URLs, canonical tags, no duplicate content. Verify improvements via logs, Lighthouse, and automated checks. Review /pages or /app directory structure. Detect if using Pages Router or App Router. Identify blog post generation (Markdown, MDX, CMS, etc.). Create a TODO.md or SEO_IMPROVEMENT_LOG.md to track progress. Metadata System Implementation For Pages Router: Add/import
from next/head in all pages. For App Router (Next.js 13+): Use export const metadata = {} or generateMetadata() for dynamic pages. Each page must include: Title (≤ 60 characters, keyword-focused). Meta description (≤ 160 characters, compelling). Open Graph tags (og:title, og:description, og:image, og:url). Twitter Card tags. . For dynamic routes ([slug].tsx), generate metadata from post content. 3. Semantic HTML + Structured Data (JSON-LD) Replace generic