A minimal blog template, based on markdown and next.js.
Add your blog posts as markdown files into the posts
directory (the directory currently contains 5 example posts).
Each markdown file needs the following frontmatter (specifically, gray-matter) in order to be correctly parsed:
Key | Value |
---|---|
authors | string[]. |
date | string. Must be in ISO 8601 format. |
excerpt | string. A short excerpt of the article, to display with the thumbnail and title on the home page. |
thumbnail | string. A URI. |
tags | string[]. |
title | string. The post's title. |
On the home page, posts are ordered by date descending.
npm install
npm run dev
If you don't want to install nodejs locally, you can use Docker to develop this application instead.
Once Docker is installed/running, you can create an image and container via:
docker build --tag blog-template .
docker run -p 3000:3000 -v "$(pwd):/app" blog-template
There are many ways to host a next.js app. I recommend hosting on Vercel.
- Increase the amount of configuration.
- Change favicon.
- Change blog icon in navbar.