Build a Marketing Website with Next.js — Prompt Template
Give these prompts to your AI agent to build your own SEO blog.
Phase 1: Initialize Project
What it does: Sets up a Next.js project with all the tools needed to build a modern website.
Prompt:
"Create a new Next.js 16 project with TypeScript and Tailwind CSS. Use the App Router. Project name: [YOUR-PROJECT-NAME]. Place it in ~/Projects/[YOUR-PROJECT-NAME]. After creating, install these dependencies: npm install next-mdx-remote gray-matter remark-gfm. Then initialize shadcn/ui with default settings and add these components: button, card, navigation-menu."
Phase 2: Set Up MDX Blog
What it does: Lets you write blog posts in Markdown with React components inside — like embedding a signup form directly in your article.
Prompt:
"In the project at ~/Projects/[YOUR-PROJECT-NAME], create these files:
src/lib/mdx.ts— Functions to read .mdx files fromcontent/blog/. Use gray-matter for frontmatter. Export:getBlogPostContent(slug)andgetAllBlogSlugs().
src/components/mdx-content.tsx— MDX renderer using next-mdx-remote/rsc. Include custom components for h1, h2, h3, p, ul, ol, li, code, pre, a, table, th, td, blockquote. Use remark-gfm plugin. Style with Tailwind.
src/app/blog/[slug]/page.tsx— Dynamic blog page. Use generateStaticParams to pre-build all posts. Get metadata from frontmatter. Render MDXContent. Handle notFound()."
Phase 3: Create Sample Content
What it does: Creates your first blog post and a data file that tracks all your posts so the site knows what pages to build.
Prompt:
"Create these files in ~/Projects/[YOUR-PROJECT-NAME]:
content/blog/hello-world.mdxwith frontmatter: title='Hello World', date='[TODAYS-DATE]', excerpt='Your first post'. Content: a brief intro paragraph.
data/blog-posts.json— Array of all blog post metadata (slug, title, date, excerpt)."
Phase 4: Add Comparison Pages
What it does: Builds pages where you pit your product against competitors — these rank well for "X vs Y" searches.
Prompt:
"In ~/Projects/[YOUR-PROJECT-NAME], create:
data/comparisons.json— Array of comparison objects. Each has: slug, title, description, pros (array), cons (array). Add 2 sample comparisons for [YOUR-NICHE].
src/app/compare/[slug]/page.tsx— Dynamic comparison page. Read from comparisons.json. Generate static params for all comparisons. Display title, description, then two columns: green box for pros, red box for cons. Use Tailwind for styling."
Phase 5: Add Persona Pages
What it does: Creates targeted landing pages for specific audiences (e.g., "for lawyers", "for doctors") — these capture high-intent traffic.
Prompt:
"In ~/Projects/[YOUR-PROJECT-NAME], create:
data/personas.json— Array of persona objects. Each has: slug, profession, description, painPoints (array), howYouHelp (string). Add 3 personas relevant to [YOUR-NICHE].
src/app/for/[profession]/page.tsx— Dynamic persona pages. Read from personas.json. Display: 'For [profession]' heading, description, pain points as bullet list, how you help them. Use cards for visual appeal."
Phase 6: Add Analytics
What it does: Tracks visitor behavior — page views, time on site, traffic sources — without slowing down your site.
Prompt:
"In ~/Projects/[YOUR-PROJECT-NAME], install @vercel/analytics and add the Analytics component to src/app/layout.tsx. Wrap the children in the body tag."
Phase 7: Documentation Pages
What it does: Builds a help center so users can self-serve — reduces your support burden and builds trust.
Prompt:
"Create a documentation section in ~/Projects/[YOUR-PROJECT-NAME]:
src/app/docs/page.tsx— Docs landing page. List sections: Getting Started, Features, FAQ. Each links to /docs/[section].Create subpages: /docs/getting-started, /docs/features, /docs/faq as static pages with sample content about [YOUR-PROJECT]."
Phase 8: SEO Optimization
What it does: Tells Google what each page is about so you rank higher; creates custom social images when links are shared.
Prompt:
"Add SEO metadata to all pages in ~/Projects/[YOUR-PROJECT-NAME]:
Every page should export a generateMetadata function returning title and description.
Add JSON-LD schema to blog posts: BlogPosting with headline, datePublished, author.
Create opengraph-image.tsx for blog and comparison pages to auto-generate social images."
Phase 9: Deployment
What it does: Puts your site on the internet with one command — Vercel builds and hosts it for free.
Prompt:
"Prepare ~/Projects/[YOUR-PROJECT-NAME] for Vercel deployment:
Create README.md with: project name, one-line description, tech stack, how to run locally (npm run dev), how to deploy.
Verify next.config.ts has proper output: 'export' for static export, or leave default for Vercel.
Push to GitHub and provide the commands they need to deploy to Vercel."
Customization Variables
Replace these placeholders in all prompts:
| Placeholder | Example |
|---|---|
| [YOUR-PROJECT-NAME] | my-saas-blog |
| [YOUR-NICHE] | AI tools, Marketing, Fitness |
| [TODAYS-DATE] | 2026-02-23 |
| [YOUR-PROJECT] | The name of your project |
Usage
Give each prompt one at a time to your AI agent. Wait for each step to complete before moving to the next.
The result: A fully functional SEO blog with MDX blog posts, comparison pages, persona pages, docs section, and Vercel deployment ready.
The stack: Next.js 16, TypeScript, Tailwind CSS, shadcn/ui, MDX, Vercel
Learn alongside 1,000+ operators
Ask questions, share workflows, and get help from people running OpenClaw every day.
📚 Explore More
How to Build an AI Reminder System
Forget sticky notes. Tell your AI once and it'll remind you at the right time.
Notion
Your AI-powered Notion assistant. Query databases, create pages, automate meeting notes, manage projects, and build team wikis through natural conversation. Enterprise-ready workspace automation.
Context Overflow — Prompt Too Large for Model
Long conversations cause 'context overflow' errors. How to fix and prevent it.
How to Build an AI Note-Taking System
Capture thoughts on the go. Let AI organize, tag, and find them later.