Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing the localized tagline as the page's title #3544

Merged
merged 1 commit into from
May 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions website/core/Site.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ const Site = React.createClass({
render() {
const title = this.props.title
? this.props.title + ' · ' + siteConfig.title
: siteConfig.title + ' · ' + siteConfig['en'].tagline;
const description = this.props.description || siteConfig['en'].tagline;
: siteConfig.title + ' · ' + siteConfig[this.props.language].tagline;
const description =
this.props.description || siteConfig[this.props.language].tagline;
const url =
siteConfig.url + siteConfig.baseUrl + (this.props.url || 'index.html');
return (
Expand All @@ -35,8 +36,13 @@ const Site = React.createClass({
<Footer language={this.props.language} />
</div>
<div id="fb-root" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script>
<script dangerouslySetInnerHTML={{__html: `
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"
/>
<script
dangerouslySetInnerHTML={{
__html: `
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
Expand All @@ -54,12 +60,13 @@ const Site = React.createClass({
indexName: 'jest',
inputSelector: '#search_input_react'
});
`}} />
<script async defer src="https://buttons.github.io/buttons.js"></script>
`,
}}
/>
<script async defer src="https://buttons.github.io/buttons.js" />
</body>
</html>
);
},
});

module.exports = Site;