From Keywords to Knowledge Entities
Search has transformed. While Googlebot still crawls HTML for ranking signals, answer engines (Perplexity, ChatGPT Search, Google AI Overviews) index structured entities and direct citations.
Optimizing modern Next.js apps requires pairing traditional core web vitals with machine-readable JSON-LD schemas and clear semantic content architecture.
1. Dynamic Next.js Metadata API
The App Router provides generateMetadata() for asynchronous, page-specific metadata resolution. Always provide canonical URLs, social graph fallbacks, and descriptive robots directives:
export async function generateMetadata({ params }): Promise<Metadata> {
const { slug } = await params;
const post = await getPostBySlug(slug);
return {
title: `${post.title} | Amit Narwal`,
description: post.excerpt,
alternates: {
canonical: `https://amitnarwal.com/blog/${post.slug}`,
},
openGraph: {
type: "article",
url: `https://amitnarwal.com/blog/${post.slug}`,
title: post.title,
description: post.excerpt,
images: [{ url: post.image, width: 1200, height: 630 }],
},
};
}2. Entity Grounding with JSON-LD Schemas
LLMs and crawler knowledge graphs consume Schema.org microdata to understand relationships between authors, organizations, and technical articles:
- BlogPosting / TechArticle: Declares explicit headline, publish date, author reference, and publisher credentials.
- BreadcrumbList: Enables search engines to accurately map your site hierarchy in search result snippets.
- Person & ProfessionalService: Grounds developer identity, services offered, and portfolio provenance.
3. Dynamic Sitemap & Robots Routing
In Next.js, sitemap.ts and robots.ts live directly in your src/app/ root. They generate fresh, valid XML feeds dynamically without requiring manual build-step scripts, ensuring newly published content is immediately indexable.

