Skip to content

Latest commit

 

History

History
60 lines (36 loc) · 2.26 KB

README.md

File metadata and controls

60 lines (36 loc) · 2.26 KB

Deployment Status

NextJS Starter Blog Template with Markdown Files

This is a basic blog template that includes:

  • Next.js app using SSR, API routes, and persistent layouts
  • SCSS modules and variable fonts
  • Content sourced from Markdown files
  • Search

Test the demo out for yourself.

Getting Started

You can start a new repo by using this as a template.

Requires: yarn, node.

Run the development server:

yarn dev

Open http://localhost:3000.

Development

Blog posts are stored in ./public/content/posts. Blog posts should follow this format, with the filename used as the post's slug:

---
title: Blog Post Title
description: A description of the blog post
date: year-month-day
---

Blog post body.

Other site content is in ./public/content/about and follows the same format as posts.

Retrieving and parsing the site content is done with ./src/lib/getContent.js.

Browser Support

Next.js comes with polyfills and CSS support for IE11 and modern browsers.

Browserslist is also used to determine supported browsers and provide those settings to other tools like Babel and Autoprefixer. The rules can be updated in the browserslist key package.json, and the current settings can be easily viewed at browsersl.ist.

Deployment

This project is most easily deployed via Vercel, but should work on other platforms if they support serverless functions. You may need to install and configure additional packages if you deploy elsewhere, such as next-on-netlify if you'd prefer to use Netlify.

Deploy with Vercel

Contributing

Please open a pull request.