supastarter for Next.js and Supabase


supastarter also includes blogging functionality. It's a mdx powered blog, so you can write your blog posts in markdown right inside of your projects code and even use react components in your posts.

1. Create a blog post

To create a new blog post, create a new file in the content/blog directory. The file name should be the url slug of the post. For example, if you want the url to be, then the file name should be my-first-post.mdx.

The file should start with a frontmatter block, which is a yaml-like block that contains metadata about the post. The frontmatter block should be surrounded by three dashes (---).

title: My First Post
excerpt: Short description of the post which will be shown in the blog list
authorName: Your name
authorImage: /blog/images/author.jpg
date: 2022-09-06
published: false

The title and date fields are required. The excerpt field is optional, but recommended. The authorName and authorImage fields are optional, but recommended if you want to show the author of the post. The published field is optional, and defaults to false which means the post will not be shown in the blog list, but is available via the url. This can be helpful if you want to write a post and publish it later.

The rest of the file should be the content of the post. You can write it in markdown, and you can even use react components inside of the post.

# My First Post
This is my first post. I'm so excited!

If you want an example of a blog post, you can check out the welcome.mdx file in the content/blog directory.

2. Publish the post

To publish the post, set the published field to true and commit the changes. The post will be published to the blog list.