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

---
title:
date:
type:
comment:
cover:
katex:
reprint:
locate:
---

Front Matter Properties

PropertyTypeDescription
titlestring
Required
Page title
datedatetime
Required
Page creation date
typestring
Required
Required for about, links, friends, moments, toolbox pages
updateddatetime
Optional
Page update date
descstring
Optional
Page description
asideboolean
Optional
Enable sidebar (default true)
commentboolean
Optional
Show comments module (default true)
coverstring
Optional
Top image URL
reprintboolean
Optional
Copyright (default original); true for reprint
katexboolean
Optional
Enable katex (default false)
locatestring
Optional
Article creation location
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
containerboolean
Optional
Enable container (default true)