Comments
1 min
Shipping a Next.js Portfolio with Local MDX Content
How to keep a portfolio easy to edit without introducing a full CMS.
Local MDX works well for a small portfolio because the content is versioned with the code, easy to review, and much nicer to write than nested JSON.
Why MDX
JSON is great for structured content like profile details or work experience. MDX is better for writing because headings, links, images, lists, and code blocks stay readable in source control.
ts
import { getPosts } from "@/lib/content";
export function generateStaticParams() {
return getPosts().map((post) => ({ post: post.slug }));
}Frontmatter for lists
The list pages still need metadata: title, date, tags, description, cover image, and featured state. Frontmatter gives each MDX file that structured layer without forcing the article body into JSON.
Comments
Comments are not configured yet.