mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 18:27:56 +02:00
Add config option to allow disabled header title
This commit is contained in:
parent
523d824651
commit
704897fd61
2 changed files with 5 additions and 3 deletions
|
@ -48,6 +48,7 @@ const siteConfig = {
|
||||||
],
|
],
|
||||||
/* path to images for header/footer */
|
/* path to images for header/footer */
|
||||||
headerIcon: "img/docusaurus.svg",
|
headerIcon: "img/docusaurus.svg",
|
||||||
|
disableHeaderTitle: false /* disable title text in header (only show headerIcon) */,
|
||||||
footerIcon: "img/docusaurus.svg",
|
footerIcon: "img/docusaurus.svg",
|
||||||
favicon: "img/favicon.png",
|
favicon: "img/favicon.png",
|
||||||
/* default link for docsSidebar */
|
/* default link for docsSidebar */
|
||||||
|
|
|
@ -113,9 +113,10 @@ class HeaderNav extends React.Component {
|
||||||
<header>
|
<header>
|
||||||
<a href={this.props.baseUrl}>
|
<a href={this.props.baseUrl}>
|
||||||
<img src={this.props.baseUrl + siteConfig.headerIcon} />
|
<img src={this.props.baseUrl + siteConfig.headerIcon} />
|
||||||
<h2>
|
{!this.props.config.disableHeaderTitle &&
|
||||||
{this.props.title}
|
<h2>
|
||||||
</h2>
|
{this.props.title}
|
||||||
|
</h2>}
|
||||||
</a>
|
</a>
|
||||||
{this.renderResponsiveNav()}
|
{this.renderResponsiveNav()}
|
||||||
</header>
|
</header>
|
||||||
|
|
Loading…
Add table
Reference in a new issue