write new post and deploy to github
Create new post
$hexo new "title"
Deploy to github
- update message in
_config.yml
- execute the following hexo commands in bash
$hexo clean && hexo g $hexo server $hexo deploy
Post font-header定义
Detailed Front-matter options
Everything in the Front-matter option is not required. But I still recommend at least filling in the values of title
and date
.
Options | Defaults | Description |
---|---|---|
title | Markdown’s file title | Post title, it is highly recommended to fill in this option |
date | Date and time when the file created | Publish time, it is highly recommended to fill in this option, and it is best to ensure that it is globally unique |
author | author in root _config.yml |
Post author |
img | a value in featureImages |
Post feature image,For example: http://xxx.com/xxx.jpg |
top | true |
Recommended post (whether the post is topped), if the top value is true , it will be recommended as a homepage post. |
hide | false |
Whether show this post in homepage, if the hide value is true , it will not be showed in homepage. |
cover | false |
The v1.0.2 version is added to indicate whether the post needs to be added to the homepage carousel cover. |
coverImg | null | The new version of v1.0.2 indicates that the post needs to display the image path on the cover of the homepage. If not, the default image of the post is used by default. |
password | null | The post read the password. If you want to set the reading verification password for the article, you can set the value of password , which must be encrypted with SHA256 to prevent others from seeing it. The premise is that the verifyPassword option is activated in the theme’s config.yml |
toc | true |
Whether TOC is turned on or not, you can turn off the TOC function for an article. The premise is that the toc option is activated in the theme’s config.yml |
mathjax | false |
Whether to enable math formula support, whether this article starts mathjax , and you need to open it in the theme _config.yml file. |
summary | null | Post summary, custom post summary content, if the attribute has a value, the post card summary will display the text, otherwise the program will automatically intercept part of the article as a summary |
categories | null | Article classification, the classification of this topic represents a macroscopically large classification, only one article is recommended for one classification. |
tags | null | Post label, a post can have multiple labels |
keywords | Post Title | Post key Words With SEO |
reprintPolicy | cc_by | Post reprint policy, value could be one of cc_by, cc_by_nd, cc_by_sa, cc_by_nc, cc_by_nc_nd, cc_by_nc_sa, cc0, noreprint and pay |
Note:
- post’s featured picture will take remainder if not writing the
img
property, and choose the featured picture of theme to let all of post’s picture have their own characteristics.- The value of
date
should try to ensure that each article is unique, becauseGitalk
andGitment
recognizeid
in this topic are uniquely identified by the value ofdate
.- If you want to set the ability to read the verification password for the article, you should not only set the value of the password with SHA256 encryption in Front-matter, but also activate the configuration in the theme
_config.yml
.- you can define reprint policy for a single article in the front-matter of the specific md file using this key: reprintPolicy
The following are examples of the post’s Front-matter
.
The simplest example
---
title: typora-vue-theme Theme introduction
date: 2018-09-07 09:25:00
---
The most comprehensive example
---
title: typora-vue-theme Theme introduction
date: 2018-09-07 09:25:00
author: Qi Zhao
img: /source/images/xxx.jpg
top: true
hide: false
cover: true
coverImg: /images/1.jpg
password: 8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92
toc: false
mathjax: false
summary: This is the content of your custom post summary. If there is a value for this attribute, the post card summary will display the text, otherwise the program will automatically intercept part of the post content as a summary.
categories: Markdown
tags:
- Typora
- Markdown
---