Skip to content

Commit

Permalink
docs($cn): docs: extend Hero example with core properties (#1088)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Dec 12, 2018
1 parent 14084c7 commit 1ac172c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/@vuepress/plugin-blog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ module.exports = (options, ctx) => {
}) => {
if (when(pageCtx)) {
Object.keys(frontmatter).forEach(key => {
rawFrontmatter[key] = rawFrontmatter[key] || frontmatter[key]
if (!frontmatter[key]) {
rawFrontmatter[key] || frontmatter[key]
}
})
Object.assign(pageCtx, data)
}
Expand Down
4 changes: 3 additions & 1 deletion packages/docs/docs/zh/theme/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@

## 首页

默认的主题提供了一个首页(Homepage)的布局 (用于 [这个网站的主页](../README.md))。想要使用它,需要在你的根级 `README.md`[YAML front matter](../guide/markdown.md#front-matter) 指定 `home: true`以下是这个网站实际使用的数据
默认的主题提供了一个首页(Homepage)的布局 (用于 [这个网站的主页](../README.md))。想要使用它,需要在你的根级 `README.md`[YAML front matter](../guide/markdown.md#front-matter) 指定 `home: true`以下是一个如何使用的例子

``` yaml
---
home: true
heroImage: /hero.png
heroText: Hero 标题
tagline: Hero 副标题
actionText: 快速上手 →
actionLink: /zh/guide/
features:
Expand Down

0 comments on commit 1ac172c

Please sign in to comment.