mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
Add hide_title metadata that hides the title text on the top of the doc (#540)
This commit is contained in:
parent
ad5b8b92b4
commit
6dd6ead19f
4 changed files with 3842 additions and 16 deletions
|
@ -23,17 +23,16 @@ class DocsLayout extends React.Component {
|
|||
if (this.props.Doc) {
|
||||
DocComponent = this.props.Doc;
|
||||
}
|
||||
const title = i18n
|
||||
? translation[this.props.metadata.language]['localized-strings'][
|
||||
this.props.metadata.localized_id
|
||||
] || this.props.metadata.title
|
||||
: this.props.metadata.title;
|
||||
return (
|
||||
<Site
|
||||
config={this.props.config}
|
||||
className="sideNavVisible doc"
|
||||
title={
|
||||
i18n
|
||||
? translation[this.props.metadata.language]['localized-strings'][
|
||||
this.props.metadata.localized_id
|
||||
] || this.props.metadata.title
|
||||
: this.props.metadata.title
|
||||
}
|
||||
title={title}
|
||||
description={content.trim().split('\n')[0]}
|
||||
language={metadata.language}
|
||||
version={metadata.version}
|
||||
|
@ -46,14 +45,8 @@ class DocsLayout extends React.Component {
|
|||
content={content}
|
||||
config={this.props.config}
|
||||
source={metadata.source}
|
||||
title={
|
||||
i18n
|
||||
? translation[this.props.metadata.language][
|
||||
'localized-strings'
|
||||
][this.props.metadata.localized_id] ||
|
||||
this.props.metadata.title
|
||||
: this.props.metadata.title
|
||||
}
|
||||
hideTitle={this.props.metadata.hide_title}
|
||||
title={title}
|
||||
version={metadata.version}
|
||||
language={metadata.language}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue