Skip to content

Commit c3d3241

Browse files
committed
Merge pull request graphql#11 from koba04/fix-document-title
Fix document.title
2 parents bf14656 + 8e79726 commit c3d3241

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

site/_core/BlogLayout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var BlogLayout = React.createClass({
1717
var page = this.props.page;
1818
var site = this.props.site;
1919
return (
20-
<Site section="blog">
20+
<Site section="blog" title={page.title}>
2121
<section className="content wrap documentationContent">
2222
<BlogSidebar site={site} page={page} />
2323
<div className="inner-content">

site/_core/DocsLayout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var DocsLayout = React.createClass({
1717
var page = this.props.page;
1818
var site = this.props.site;
1919
return (
20-
<Site section="docs">
20+
<Site section="docs" title={page.title}>
2121
<section className="content wrap documentationContent">
2222
<DocsSidebar site={site} page={page} />
2323
<div className="inner-content">

site/_core/Site.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ var SiteData = require('./SiteData');
1212

1313
var Site = React.createClass({
1414
render: function() {
15+
var pageTitle = this.props.title ? `${this.props.title} | GraphQL` : `GraphQL | ${SiteData.description}`;
1516
return (
1617
<html>
1718
<head>
1819
<meta charSet="utf-8" />
1920
<meta httpEquiv="X-UA-Compatible" content="IE=edge,chrome=1" />
20-
<title>GraphQL | {SiteData.description}</title>
21+
<title>{pageTitle}</title>
2122
<meta name="viewport" content="width=device-width" />
2223
<meta property="og:title" content={'GraphQL | ' + SiteData.description} />
2324
<meta property="og:type" content="website" />

0 commit comments

Comments
 (0)