Blog

Writing a post#

You can write MDX exactly the same way you do with documentation

There are also additional options you should pass to the front matter:

  • name

  • date

  • description

The name option will be the main title of you post page and the date option will be positioned below, in a pretty and simple layout

These details are also used by the BlogPosts component to show a grid of all your posts

md
1
---
2
name: Example post
3
date: 25 June, 2020
4
description: An example post made just to test the dokz blog feature
5
---
6
7
## Blog post content...

Adding SEO#

You can use the package next-seo to easily add SEO tags to any nextjs page

md
1
---
2
name: Example post
3
date: 25 June, 2020
4
description: An example post made just to test the dokz blog feature
5
---
6
7
import { NextSeo } from 'next-seo'
8
9
<NextSeo title='Title' description='A short description goes here.' />
10
11
## My content...
Previous
Adding a blog
Writing a post