Skip to content

Commit a28804c

Browse files
Sun Haoranulivz
Sun Haoran
authored andcommittedNov 29, 2019
feat($theme-default): allow optional subtitle (#1981)
1 parent 21836fb commit a28804c

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed
 

‎packages/@vuepress/theme-default/components/Home.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

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

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

‎packages/docs/docs/theme/default-theme-config.md

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ footer: MIT Licensed | Copyright © 2018-present Evan You
2929
---
3030
```
3131

32+
You can disable `title` and `subtitle` by setting the corresponding field to `null`.
33+
3234
Any extra content after the `YAML front matter` will be parsed as normal Markdown and rendered after the features section.
3335

3436
To use a fully custom homepage layout, you can also use a [Custom Layout](#custom-layout-for-specific-pages).

‎packages/docs/docs/zh/theme/default-theme-config.md

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ footer: MIT Licensed | Copyright © 2018-present Evan You
2727
---
2828
```
2929

30+
你可以将相应的内容设置为 `null` 来禁用标题和副标题。
31+
3032
任何 `YAML front matter` 之后额外的内容将会以普通的 markdown 被渲染,并插入到 `features` 的后面。
3133

3234
## 导航栏

0 commit comments

Comments
 (0)
Please sign in to comment.