Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat($theme-default): allow optional subtitle #1981

Merged
merged 2 commits into from
Nov 29, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
allow disable subtitle
ludanxer committed Oct 25, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8f3e2d66c86a12fd07b1ab1589ba8a2eb6fbebd5
2 changes: 1 addition & 1 deletion packages/@vuepress/theme-default/components/Home.vue
Original file line number Diff line number Diff line change
@@ -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>

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

You can disable `title` and `subtitle` by setting the correspoding fields to `null`.
haoranpb marked this conversation as resolved.
Show resolved Hide resolved

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).
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
@@ -27,6 +27,8 @@ footer: MIT Licensed | Copyright © 2018-present Evan You
---
```

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

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

## 导航栏