1. Docs

Frontmatter

Frontmatter is the metadata for the post, it contains title, slug, date, category, tags, etc.

Here frontmatter is following YAML format so the frontmatter options will be enclosed within triple dashes (---).

Frontmatter must be kept at the top of index.md file.

Here is an example of the frontmatter:

---
title: Excellent Title for Your Post
description: A brief summary or description of your post.
slug: this-is-what-would-be-used-in-url
category: My Awesome Category
tags:
  - how to
  - example
date: '2024-07-23'
author: vivek
keywords:
  - seo optimization
  - schema markup
lastmod_date: '2024-07-24'
draft: true
---

There are some more options that can be used. Below is full list of options:

OptionTypeExampleDescription
titlestring'First Post'Sets title of the post
descriptionstring'a brief summary of post'Used in post snipped and SEO.
slugstring'this-is-my-post'Used in the post url
categorystring'Productivity'Creates the category and add post to it.
tagsarray | list
        - feel good
        - beginner
                
Associate the post with given tags. Also used in SEO
datestring'2024-07-25'Sets the created date of the post.
lastmod_datestring'2024-07-26'Sets the last modified/updated date for post. Used in SEO.
authorstring | list'vivek'Shows author name in the post.
keywordslist | array
        - how to write
        - journaling
                
Used for SEO
imagestring'post-dir/image-name.png'For cover and opengraph image of post
draftbooleantrue | falseSets whether the post is draft or not
aliaseslist | array
        - alternate-slug
                
Defines alternate slug, this will be redirected to the original slug
robotsNoIndexbooleantrueIf set to true then post will not be indexed by search engines (if not already done)
showTocbooleanfalseIf set to false then table of contents will not be show
unlistedbooleantrueIf set to true then post will not be directly accessible, even by search engines. Can be accessed only via direct link.
ghostbooleantrueBlog post not visible anywhere on the site however indexable by search engines and included in sitemap.xml
redirectToUrlstringhttps://vivekshuk.laWill redirect user to given url when post is opened