Skip to content

Latest commit

 

History

History
160 lines (110 loc) · 5.65 KB

README.md

File metadata and controls

160 lines (110 loc) · 5.65 KB

ChakraUI Nextjs Starter Blog

WIP

Stargazers Forks Contributors Issues MIT License

Deploy with Vercel

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!

Motivation

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.

Features

  • 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

Quick Start Guide

  1. Clone the repo
git clone https://github.com/michaelradu/chakra-nextjs-starter-blog.git
  1. Personalize the template
  2. Add your projects to /projects/
  3. Modify headerNavLinks.js to customize navigation links
  4. Add blog posts to /data/
  5. Deploy on Vercel or Netlify

Installation

npm install

Development

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.

Extend / Customize

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.

Post

gray-matter

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"
---

Deploy

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.

Licence

MIT © Michael Radu