Frontend
Blog
Blog setup, content, and structure in NextBento.
Overview
NextBento includes a blog powered by MDX files in content/blog/. Posts are listed on /blog and individual posts at /blog/[slug].
File Structure
content/blog/
your-post.mdx # Each post is an MDX file
another-post.mdx
lib/blog/
posts.ts # getAllPosts, getPostBySlug, getAllPostSlugs
Post Frontmatter
Each MDX post uses frontmatter:
---
title: Your Post Title
description: Short description for SEO and listing
date: 2024-01-15
author: Your Name
tags: [nextjs, saas, tips]
image: /images/post-cover.jpg # optional
---
Adding a Post
- Create
content/blog/my-new-post.mdx - Add frontmatter (title, description, date, author, tags)
- Write content in MDX
- The post appears on
/blogand at/blog/my-new-post
Routes
| Route | File | Description |
|---|---|---|
/blog | app/blog/page.tsx | Blog index, lists all posts |
/blog/[slug] | app/blog/[slug]/page.tsx | Individual post page |
Layout
Blog pages use LandingHeader and LandingFooter from Landing 1. Posts are rendered with MDX.
SEO
- Blog index:
Blogschema,Articleschema per post - Post pages:
Articleschema, metadata from frontmatter - Sitemap: Add
/blogand/blog/*to sitemap
Next Steps
- Landing 1 Components — Header/Footer used by blog
- SEO — Metadata and schema