Documentation Index
Fetch the complete documentation index at: https://mintlify.com/shuding/nextra/llms.txt
Use this file to discover all available pages before exploring further.
nextra-theme-blog provides a minimal, content-focused layout for blog sites built with Next.js and Nextra. Unlike the docs theme, configuration is entirely prop-based on the <Layout> component — there is no separate theme config file. The theme integrates next-themes for dark mode and next-view-transitions for smooth page animations.
Import
Remember to import
nextra-theme-blog/style.css once in your root layout.
Without it, the theme’s Tailwind-based utility classes will not apply.BlogMetadata type
BlogMetadata describes the shape of the frontmatter fields that Nextra reads from each .mdx blog post file. These values are available on pageMap entries as frontMatter and are used by components like <PostCard> to render post listings.
posts/my-post.mdx
ReadingTime type
The readingTime field is populated automatically when you enable the
remark-reading-time plugin in your Nextra configuration.
Layout props
The <Layout> component wraps your entire site in a next-themes ThemeProvider and a next-view-transitions ViewTransitions provider, then renders content inside a centered prose container.
The page content. In the Next.js App Router, this is the
{children} slot
automatically passed to every root layout.Configuration forwarded to the
next-themes ThemeProvider.
Accepts all ThemeProvider props except children.Optional banner content rendered inside the
ThemeProvider wrapper, above
the prose article container. Use this for site-wide announcements.Footer props
<Footer> in nextra-theme-blog is intentionally minimal — it renders a small <small> element with bottom margin.
Copyright or other footer text. Replace with your own content.
The blog
<Footer> is a plain <small> block styled with Tailwind prose
utilities. It is separate from nextra-theme-docs’s <Footer>, which
includes locale and theme switchers.Full layout example
The following shows a completeapp/layout.tsx for a nextra-theme-blog site
with a navbar, footer, and the blog stylesheet imported:
Individual post layout
For pages that display a single post, renderchildren directly inside a
Next.js page file. Nextra’s MDX pipeline injects the prose container from
<Layout> automatically. Use the built-in <Meta> internals via frontmatter
to display author, date, tags, and reading time:
posts/hello-world.mdx
pageMap API for use in listing pages.