From 704897fd61bb7cacf849d204baed71b59d9dfe17 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Mon, 17 Jul 2017 10:35:43 -0700 Subject: [PATCH] Add config option to allow disabled header title --- examples/siteConfig.js | 1 + lib/core/nav/HeaderNav.js | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/siteConfig.js b/examples/siteConfig.js index f5dcc7f1cf..36d5a7b107 100644 --- a/examples/siteConfig.js +++ b/examples/siteConfig.js @@ -48,6 +48,7 @@ const siteConfig = { ], /* path to images for header/footer */ headerIcon: "img/docusaurus.svg", + disableHeaderTitle: false /* disable title text in header (only show headerIcon) */, footerIcon: "img/docusaurus.svg", favicon: "img/favicon.png", /* default link for docsSidebar */ diff --git a/lib/core/nav/HeaderNav.js b/lib/core/nav/HeaderNav.js index ba86bbf263..e01ae1ee40 100644 --- a/lib/core/nav/HeaderNav.js +++ b/lib/core/nav/HeaderNav.js @@ -113,9 +113,10 @@ class HeaderNav extends React.Component {
-

- {this.props.title} -

+ {!this.props.config.disableHeaderTitle && +

+ {this.props.title} +

}
{this.renderResponsiveNav()}