Merge pull request #2205 from muan/title

[Docs] Add dynamic page title
This commit is contained in:
James Ide 2015-08-02 15:04:03 -07:00
commit 0b5e229ed2
5 changed files with 8 additions and 6 deletions

View File

@ -14,14 +14,16 @@ var HeaderLinks = require('HeaderLinks');
var Site = React.createClass({
render: function() {
var title = this.props.title ? this.props.title + ' ' : '';
title += 'React Native | A framework for building native apps using React';
return (
<html>
<head>
<meta charSet="utf-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>React Native | A framework for building native apps using React</title>
<title>{title}</title>
<meta name="viewport" content="width=device-width" />
<meta property="og:title" content="React Native | A framework for building native apps using React" />
<meta property="og:title" content={title} />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://facebook.github.io/react-native/index.html" />
<meta property="og:image" content="http://facebook.github.io/react-native/img/opengraph.png?2" />

View File

@ -338,7 +338,7 @@ var Autodocs = React.createClass({
<APIDoc content={docs} />;
return (
<Site section="docs">
<Site section="docs" title={metadata.title}>
<section className="content wrap documentationContent">
<DocsSidebar metadata={metadata} />
<div className="inner-content">

View File

@ -18,7 +18,7 @@ var DocsLayout = React.createClass({
var metadata = this.props.metadata;
var content = this.props.children;
return (
<Site section="docs">
<Site section="docs" title={metadata.title}>
<section className="content wrap documentationContent">
<DocsSidebar metadata={metadata} />
<div className="inner-content">

View File

@ -18,7 +18,7 @@ var support = React.createClass({
var metadata = this.props.metadata;
var content = this.props.children;
return (
<Site section={metadata.section}>
<Site section={metadata.section} title={metadata.title}>
<section className="content wrap documentationContent nosidebar">
<div className="inner-content">
<Marked>{content}</Marked>

View File

@ -15,7 +15,7 @@ var H2 = require('H2');
var support = React.createClass({
render: function() {
return (
<Site section="support">
<Site section="support" title="Support">
<section className="content wrap documentationContent nosidebar">
<div className="inner-content">