This is a Next.js, Chakra UI blogging starter template.It comes out of the box configured with the latest technologies to make technical writing a breeze. Easily configurable and customizable. Perfect as a replacement to existing Jekyll and Hugo individual blogs. This project was inspired by its Tailwind CSS counterpart.
Check out the documentation below to get started.
Feature request? Check the past discussions to see if it has been brought up previously. Otherwise, feel free to start a new discussion thread. All ideas are welcomed!
I wanted to port my existing blog to Nextjs and Chakra UI but most templates I wanted to use as a base for getting MDX working were outdated.
- Easy styling customization with Chakra UI and primary color attribute
- Mobile-friendly view
- Light and dark theme
- MDX - write JSX in markdown documents!
- Support for tags - each unique tag will be its own page
- Support for multiple authors
- Blog templates
- Projects page
- SEO friendly
- Clone the repo
git clone https://github.com/michaelradu/chakra-nextjs-starter-blog.git
- Personalize the template
- Add your projects to
/projects/
- Modify
headerNavLinks.js
to customize navigation links - Add blog posts to
/data/
- Deploy on Vercel or Netlify
npm install
First, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.jsx
. The page auto-updates as you edit the file.
data
- replace with your own blog posts.
public/img
- store assets such as images.
public
- currently stores favicons
styles/theme.jsx
and styles/globals.css
- contain the stylesheet which can be modified to change the overall look and feel of the site.
components/MDXComponents.js
- pass your own JSX code or React component by specifying it over here. You can then call them directly in the .mdx
or .md
file. By default, a custom link and image component is passed.
components/Layout.js
- main template used in pages.
pages
- pages to route to. Read the Next.js documentation for more information.
next.config.js
- configuration related to Next.js. You need to adapt the Content Security Policy if you want to load scripts, images etc. from other domains.
Parse front-matter from a string or file.
Currently 5 fields are supported.
title (required)
subtitle (required)
date (required)
img (required)
tags (required)
Here's an example of a post's frontmatter:
---
title: "Test post"
subtitle: "This is a description."
date: "April 15th"
img: "/img/test.png"
tag: "Tech"
---
Vercel
The easiest way to deploy the template is to use the Vercel Platform from the creators of Next.js. Check out the Next.js deployment documentation for more details.
Netlify / GitHub Pages / Firebase etc.
Websites like Netlify or GitHub Pages are also supported.