From a896447db17e38f454f55c15e020c43603b96844 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Wed, 22 Jul 2015 13:27:21 -0700 Subject: [PATCH] Fix titles to posts --- html.cjsx | 12 ++++++++++-- pages/index.cjsx | 43 +++++++++++++++++++++++-------------------- wrappers/md.cjsx | 5 +++-- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/html.cjsx b/html.cjsx index ba92ec8688..ef158c14f4 100644 --- a/html.cjsx +++ b/html.cjsx @@ -1,15 +1,23 @@ React = require 'react' Typography = require 'typography' +DocumentTitle = require 'react-document-title' typography = new Typography() {TypographyStyle} = typography module.exports = React.createClass getDefaultProps: -> - title: "Default title" body: "" render: -> + title = DocumentTitle.rewind() + if @props.title then title = @props.title + + if __GH_PAGES__? and __GH_PAGES__ + urlPrefix = @props.config.ghPagesURLPrefix + else + urlPrefix = "" + @@ -36,6 +44,6 @@ module.exports = React.createClass
-