This is a Next.js starter blog template, with i18n. It's made upon Next.js 15 and React 19, using App Router and Server Components! All posts content is managed by MDX files, using @next/mdx module.
This template is easily configurable, customizable, and also full optimized for SEO.
Checkout the documentation below to get started.
Otherwise, feel free to open issues reporting bugs or suggesting new features.
This is still a work in progress project, so I will updating and upgrading the template by myself, with the new features, and fixes/updates.
You can visit the Blog Demo.
- Latest version of Next.js with App Router and Typescript
- Easy styling customization with Tailwind 3.0
- Easy post content styling customization using Tailwind Typography
- Easily Internationalization setup
- Internationalized URLs optimized for SEO
- MDX components
- Light/Dark mode
- SEO Friendly
- SEO Friendly pagination
- Post SEO using Next.js metadata
- Sitemap and robots.txt
- Perfect Lighthouse score
- Analytics (if you deployed on Vercel)
- Post tagging
- Table of Contents
- Styled code blocks
- Clone the repo
git clone [email protected]:rodrigo-miranda18/nextjs-mdx-intl-blog-starter.git- Install dependencies
# Install the dependencies
npm install
# or
yarn
# or
pnpm i- Create
.envfile in root dir, and set the BASE_URL
NEXT_PUBLIC_BASE_URL="Your base url comes here"-
Setup the i18n by opening the file
src/i18n/routing.ts. Choose what locales your project will support in locales attribute. The default arelocales: ['en', 'pt-BR']. -
Choose your default locale in
defaultLocaleattribute. You may wish not to change thelocalePrefixattribute, as changing it can break the static build of dynamic pages. -
Open
src/middleware.tsfile and switch the locales part ofmatcherattribute with your chosen locales. For example, if you chosefranden-GBlocales, switch/(en|pt-BR)/:path*to/(fr|en-GB)/:path*. -
Open the
/src/components/language-selector.tsxcomponent and change the available languages, as well as the icons too. -
Rename all the
.jsonfiles fromtranslationsfolder for your chosen languages, and translate all the content within it. -
Remove all mocked posts from
translations/postsfolder and write your own posts, using the{locale}.mdxsyntax for file names. -
You may want to add your own avatar image in
publicfolder. This image will be used in/aboutpage as your profile image.
src/i18n/routing.ts- contains the core configuration for your internationalization setup, including supported locales and default locale.src/components/language-selector.tsx- update available languages and their display format.translations/*.json- change the site content, and basic metadata for pages seo, like titles and descriptions, for each locale you support.translations/posts/*.mdx- write your own posts using the{locale}.mdxsyntax for file names, and also define post metadata (that will be used to build seo too).src/app/globals.css- contains global CSS variables including the color scheme for both light and dark modes, and the color scheme for code blocks.tailwind.config.ts- customize Tailwind settings, typography plugin configuration, and extend theme colors.src/app/[locale]/layout.tsx- modify the font family using next/font.public/logo.svg- replace with your own logo.public/avatar.webp- replace with your own avatar.src/app/favicon.ico- replace with your favicon.src/mdx-components.tsx- customize the rendering of MDX elements and add custom components for your blog posts.src/app/[locale]/tags/[tag]/tag-archive-template.tsx- adjust thePOSTS_PER_PAGEconstant to control pagination.src/middleware.ts- adjust internationalization path matching rules.next.config.ts- modify MDX plugins configuration and Next.js settings.
The easiest way to deploy this template is on Vercel. Check out the Next.js deployment documentation for more details. This template has Vercel Analytics in source code by default. To enable the analytics, follow this simple guide.
You can also use another host providers, like Netlify, AWS, etc. Netlify usually doesn't require any additional configurations for Next.js projects, but another providers may require custom configuration and setup to support Next.js functionalities, such as SSR, ISR, and image optimization.
Support this effort by giving a star on GitHub. If you are using this template, let me know by sending me a message on Linkedin.