From 8f3e2d66c86a12fd07b1ab1589ba8a2eb6fbebd5 Mon Sep 17 00:00:00 2001 From: ludanxer Date: Fri, 25 Oct 2019 16:50:29 +0800 Subject: [PATCH 1/2] allow disable subtitle --- packages/@vuepress/theme-default/components/Home.vue | 2 +- packages/docs/docs/theme/default-theme-config.md | 2 ++ packages/docs/docs/zh/theme/default-theme-config.md | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/@vuepress/theme-default/components/Home.vue b/packages/@vuepress/theme-default/components/Home.vue index 926428a5c8..c765b7be7d 100644 --- a/packages/@vuepress/theme-default/components/Home.vue +++ b/packages/@vuepress/theme-default/components/Home.vue @@ -9,7 +9,7 @@

{{ data.heroText || $title || 'Hello' }}

-

+

{{ data.tagline || $description || 'Welcome to your VuePress site' }}

diff --git a/packages/docs/docs/theme/default-theme-config.md b/packages/docs/docs/theme/default-theme-config.md index c83410345b..1700f37783 100644 --- a/packages/docs/docs/theme/default-theme-config.md +++ b/packages/docs/docs/theme/default-theme-config.md @@ -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`. + 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). diff --git a/packages/docs/docs/zh/theme/default-theme-config.md b/packages/docs/docs/zh/theme/default-theme-config.md index 4d4a4751b9..a9622bfffa 100644 --- a/packages/docs/docs/zh/theme/default-theme-config.md +++ b/packages/docs/docs/zh/theme/default-theme-config.md @@ -27,6 +27,8 @@ footer: MIT Licensed | Copyright © 2018-present Evan You --- ``` +你可以将相应的内容设置为 `null` 来禁用标题和副标题。 + 任何 `YAML front matter` 之后额外的内容将会以普通的 markdown 被渲染,并插入到 `features` 的后面。 ## 导航栏 From 368a6d1c4a5fd5a6c6ef7cd8155e89d95810b0ab Mon Sep 17 00:00:00 2001 From: Sun Haoran Date: Sat, 26 Oct 2019 09:32:59 +0800 Subject: [PATCH 2/2] Update packages/docs/docs/theme/default-theme-config.md Co-Authored-By: Franck Abgrall --- packages/docs/docs/theme/default-theme-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/docs/theme/default-theme-config.md b/packages/docs/docs/theme/default-theme-config.md index 1700f37783..dc18b3967b 100644 --- a/packages/docs/docs/theme/default-theme-config.md +++ b/packages/docs/docs/theme/default-theme-config.md @@ -29,7 +29,7 @@ footer: MIT Licensed | Copyright © 2018-present Evan You --- ``` -You can disable `title` and `subtitle` by setting the correspoding fields to `null`. +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.