Use this template to create a blog using Next JS and Markdown.
- Markdown support (using Contentlayer)
- Automatic styling for markdown elements (with @tailwindcss/typography)
- Syntax highlighting (using Prism)
- Tailwind CSS
Create a new markdown (.md) file in the /posts directory. The file should have the following frontmatter:
---
title: Title of your blog post
date: YYYY-MM-DD
description: Description of your blog post
---Your language may not be included in the default Prism CSS file. You can add it by selecting all the languages you need to support on the Prism download page and downloading the CSS file.
Then, replace the contents of app/prism.css with the downloaded CSS file.
See the documentation for @tailwindcss/typography for more information on how to customize the styling of the rendered markdown elements.
Yes, you can use this template for commercial projects. Please see the license for more information.
- Next.js + Contentlayer Blog Starter: Thanks to the maintainers of this project for the inspiration. I referenced this project to figure out how to set up Contentlayer with Next.js.