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
Front Matter Properties
General Properties
Property | Type | Description |
---|---|---|
title | string | Required Page/article title |
date | datetime | Required Page/article creation date |
type | string | Required* Required for pages with type values and banner setup |
updated | datetime | Optional Page/article update date |
desc | string | Optional Page/article description |
aside | boolean | Optional Enable sidebar (default true) |
comment | boolean | Optional Show comments module (default true) |
cover | string | Optional Article cover image URL (requires type for Banner images) |
reprint | boolean | Optional Copyright (default original); true for reprint |
katex | boolean | Optional Enable katex (default false) |
locate | string | Optional Article creation location |
container | boolean | Optional Enable container (for hexo-solitude-tag, default: true) |
Special Properties
Only effective when type: banner
or other pages with type
values
Property | Type | Description |
---|---|---|
leftend | string | Optional Banner bottom left text |
rightend | string | Optional Banner bottom right text |
rightbtn | string | Optional Banner bottom right button text |
rightbtnlink | string | Optional Banner bottom right button link |