| 选项 (Option) | 默认值 (Default) | 描述 (Description) |
|---|---|---|
| title | Markdown 文件名 (Markdown filename) | 文章标题,强烈建议填写该选项 (Article title, strongly recommended to set this option) |
| date | 文件创建的日期时间 (File creation datetime) | 发布时间,强烈建议填写该选项,最好保证全局唯一 (Publish time, strongly recommended, best to keep globally unique) |
| author | _config.yml 中的 author (Author in _config.yml) |
文章作者 (Article author) |
| img | featureImages 中的值 (Value from featureImages) |
文章特色图片,例如: http://xxx.com/xxx.jpg (Featured image for the article) |
| top | true | 推荐文章(是否置顶)。如果 top 为 true,将作为首页推荐文章 (Recommended article / pinned on homepage if true) |
| hide | false | 是否在首页展示。如果 hide 为 true,则该文章不会显示在首页 (Hide from homepage if true) |
| cover | false | 自 v1.0.2 起,表示文章是否需要添加到首页轮播封面 (Since v1.0.2, whether the article should appear in homepage carousel) |
| coverImg | null | 自 v1.0.2 起,文章封面图片路径。如果为空,默认使用文章图片 (Since v1.0.2, cover image path; defaults to article image if null) |
| password | null | 文章阅读密码(需 SHA256 加密),前提是主题 config.yml 启用了 verifyPassword (Password protection for article, requires SHA256, works if verifyPassword enabled) |
| toc | true | 是否启用目录(TOC),需在 _config.yml 中启用 toc (Enable Table of Contents, requires toc enabled in _config.yml) |
| mathjax | false | 是否启用数学公式支持,需要在 _config.yml 中开启 mathjax (Enable MathJax for math formulas, requires mathjax enabled) |
| summary | null | 文章摘要。如果有值则显示设置的摘要,否则自动截取文章部分内容 (Article summary; uses value if set, otherwise auto-generated) |
| categories | null | 文章分类(宏观分类,一个文章推荐一个分类) (Article category, one main category recommended) |
| tags | null | 文章标签(一个文章可以有多个标签) (Article tags, multiple tags allowed) |
| keywords | 文章标题 (Post title) | 文章关键词,用于 SEO (Article keywords, used for SEO) |
| reprintPolicy | cc_by | 文章转载策略,可选值包括 cc_by, cc_by_nd, cc_by_sa, cc_by_nc, cc_by_nc_nd, cc_by_nc_sa, cc0, noreprint, pay (Article reprint policy, options include …) |
| 参数 | 描述 | 默认值 |
|---|---|---|
| layout | 布局 | config.default_layout |
| title | 标题 | 文章的文件名 |
| date | 建立日期 | 文件建立日期 |
| updated | 更新日期 | 文件更新日期 |
| comments | 开启文章的评论功能 | true |
| tags | 标签(不适用于分页) | |
| categories | 分类(不适用于分页) | |
| permalink | 覆盖文章的永久链接,永久链接应该以 / 或 .html 结尾 | null |
| excerpt | 纯文本的页面摘要。使用 该插件 来格式化文本 | |
| disableNunjucks | 启用时禁用 Nunjucks 标签 {{ }}/{% %} 和 标签插件 的渲染功能 | false |
| lang | 设置语言以覆盖 自动检测 | 继承自 _config.yml |
| author | 作者 | 根_config.yml里设置的用户名 |
Options Defaults Description
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, because Gitalk and Gitment recognize id in this topic are uniquely identified by the value of date.
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.