Skip to content

Commit

Permalink
feat($theme-default): allow optional subtitle (#1981)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sun Haoran authored and ulivz committed Nov 29, 2019
1 parent 21836fb commit a28804c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@vuepress/theme-default/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<h1 v-if="data.heroText !== null" id="main-title">{{ data.heroText || $title || 'Hello' }}</h1>

<p class="description">
<p v-if="data.tagline !== null" class="description">
{{ data.tagline || $description || 'Welcome to your VuePress site' }}
</p>

Expand Down
2 changes: 2 additions & 0 deletions packages/docs/docs/theme/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ footer: MIT Licensed | Copyright © 2018-present Evan You
---
```

You can disable `title` and `subtitle` by setting the corresponding field to `null`.

Any extra content after the `YAML front matter` will be parsed as normal Markdown and rendered after the features section.

To use a fully custom homepage layout, you can also use a [Custom Layout](#custom-layout-for-specific-pages).
Expand Down
2 changes: 2 additions & 0 deletions packages/docs/docs/zh/theme/default-theme-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ footer: MIT Licensed | Copyright © 2018-present Evan You
---
```

你可以将相应的内容设置为 `null` 来禁用标题和副标题。

任何 `YAML front matter` 之后额外的内容将会以普通的 markdown 被渲染,并插入到 `features` 的后面。

## 导航栏
Expand Down

0 comments on commit a28804c

Please sign in to comment.