Skip to content

Commit

Permalink
Add title and fix date
Browse files Browse the repository at this point in the history
Summary: Closes jestjs#791

Differential Revision: D3041650

fb-gh-sync-id: 7402af58d9932609e3fb1a8bc6133bbe723a4f7b
shipit-source-id: 7402af58d9932609e3fb1a8bc6133bbe723a4f7b
  • Loading branch information
vjeux authored and Facebook Github Bot 3 committed Mar 11, 2016
1 parent f108912 commit f3d2e43
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion website/core/BlogPost.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var BlogPost = React.createClass({
var month = [
'January', 'February', 'March', 'April', 'May', 'June', 'July',
'August', 'September', 'October', 'November', 'December'
][parseInt(match[2], 10) + 1];
][parseInt(match[2], 10) - 1];
var day = parseInt(match[3], 10);

return (
Expand Down
8 changes: 5 additions & 3 deletions website/core/Site.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ var HeaderLinks = require('HeaderLinks');

var Site = React.createClass({
render: function() {
var title = 'Jest | ' + (this.props.title || 'Painless JavaScript Unit Testing');
var description = this.props.description || 'Painless JavaScript Unit Testing';
return (
<html>
<head>
<meta charSet="utf-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Jest | Painless JavaScript Unit Testing</title>
<title>{title}</title>
<meta name="viewport" content="width=device-width" />
<meta property="og:title" content="Jest | Painless JavaScript Unit Testing" />
<meta property="og:title" content={title} />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://facebook.github.io/jest/index.html" />
<meta property="og:image" content="http://facebook.github.io/jest/img/opengraph.png" />
<meta property="og:description" content="Painless JavaScript Unit Testing" />
<meta property="og:description" content={description} />

<link rel="shortcut icon" href="/jest/img/favicon.png" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" />
Expand Down
5 changes: 4 additions & 1 deletion website/layout/BlogPostLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ var Site = require('Site');
var BlogPostLayout = React.createClass({
render: function() {
return (
<Site section="blog">
<Site
section="blog"
title={this.props.metadata.title}
description={this.props.children.trim().split('\n')[0]}>
<section className="content wrap documentationContent">
<BlogSidebar title={this.props.metadata.title} />
<div className="inner-content">
Expand Down

0 comments on commit f3d2e43

Please sign in to comment.