Next + Netlify Markdown Blog Starter
This is a lightweight Next.js (v12+) Markdown Blog, configured so you can one-click install a blog and deploy it to Netlify!
Get started by clicking here (this will clone the repo and deploy the site):
Or, if you'd like to build it yourself, here's a tutorial blog post that should get you on the right track!
The nitty gritty
If you'd like to work with this project locally, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
If you'd like to write a new blog post, write it in Markdown in the posts
directory.
Installation options
Option one: One-click deploy
Option two: Manual clone
- Clone this repo:
git clone https://github.com/cassidoo/next-netlify-blog-starter
- Navigate to the directory and run
npm run dev
- Make your changes
- Connect to Netlify manually (the
netlify.toml
file is the one you'll need to make sure stays intact to make sure the export is done and pointed to the right stuff)
Styling
Included are some basic styles with styled-jsx, which is included out of the box with Next.js. There's also built-in Sass support and CSS Module support, if you'd prefer to use those.
The font used is Inter.
Hero images
You may include an optional hero image in your posts. Put the images in public/static/
, and then include in your blog .md file like so:
---
title: 'Post title'
author: 'Post author'
date: '2020-04-27'
hero_image: ../static/example.jpg
---
See demo-post-1.md
for an example of this.