Front Matter

Learn how to use frontmatter in Hexo blog posts (as intended for use in this theme).

Front Matter

Front matter is the metadata section of Hexo blog posts and pages, usually located at the beginning of the Markdown file. It uses YAML format to define properties of the post or page, such as title, date, type, comments, etc.

Example

In Post
In Page
Featured Page
---
title:
date:
type:
comment:
cover:
katex:
reprint:
locate:
---

Front Matter Properties

General Properties

PropertyTypeDescription
titlestring
Required
Page/article title
datedatetime
Required
Page/article creation date
typestring
Required*
Required for pages with type values and banner setup
updateddatetime
Optional
Page/article update date
descstring
Optional
Page/article description
asideboolean
Optional
Enable sidebar (default true)
commentboolean
Optional
Show comments module (default true)
coverstring
Optional
Article cover image URL (requires type for Banner images)
reprintboolean
Optional
Copyright (default original); true for reprint
katexboolean
Optional
Enable katex (default false)
locatestring
Optional
Article creation location
containerboolean
Optional
Enable container (for hexo-solitude-tag, default: true)

Special Properties

Only effective when type: banner or other pages with type values

PropertyTypeDescription
leftendstring
Optional
Banner bottom left text
rightendstring
Optional
Banner bottom right text
rightbtnstring
Optional
Banner bottom right button text
rightbtnlinkstring
Optional
Banner bottom right button link