Skip to content

Commit

Permalink
add language & version meta for algolia docsearch (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
endiliey committed Jun 19, 2018
1 parent df42926 commit 0eb6612
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/core/Head.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ class Head extends React.Component {
<meta name="viewport" content="width=device-width" />
<meta name="generator" content="Docusaurus" />
<meta name="description" content={this.props.description} />
{this.props.version && (
<meta name="docsearch:version" content={this.props.version} />
)}
{this.props.language && (
<meta name="docsearch:language" content={this.props.language} />
)}
<meta property="og:title" content={this.props.title} />
<meta property="og:type" content="website" />
<meta property="og:url" content={this.props.url} />
Expand Down
2 changes: 2 additions & 0 deletions lib/core/Site.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class Site extends React.Component {
description={description}
title={title}
url={url}
language={this.props.language}
version={this.props.version}
/>
<body
className={classNames({
Expand Down

0 comments on commit 0eb6612

Please sign in to comment.