diff --git a/website/core/Header.js b/website/core/Header.js index f49cae374..24e6784db 100644 --- a/website/core/Header.js +++ b/website/core/Header.js @@ -9,10 +9,9 @@ var slugify = require('slugify'); var Header = React.createClass({ render: function() { var slug = slugify(this.props.toSlug || this.props.children); - var H = React.DOM['h' + this.props.level]; - - return this.transferPropsTo( - + var H = 'h' + this.props.level; + return ( + {this.props.children} {' '}# diff --git a/website/core/center.js b/website/core/center.js index 78fb127d5..fdc930965 100644 --- a/website/core/center.js +++ b/website/core/center.js @@ -7,8 +7,10 @@ var React = require('React'); var center = React.createClass({ render: function() { - return this.transferPropsTo( -
{this.props.children}
+ return ( +
+ {this.props.children} +
); } }); diff --git a/website/server/generate.js b/website/server/generate.js index 2f811979a..3191ef992 100644 --- a/website/server/generate.js +++ b/website/server/generate.js @@ -6,6 +6,7 @@ var mkdirp = require('mkdirp'); var server = require('./server.js'); require('./convert.js')(); +server.noconvert = true; // Sadly, our setup fatals when doing multiple concurrent requests // I don't have the time to dig into why, it's easier to just serialize diff --git a/website/server/server.js b/website/server/server.js index e74d95b87..57a11e3b0 100644 --- a/website/server/server.js +++ b/website/server/server.js @@ -36,7 +36,9 @@ var app = connect() .use(function(req, res, next) { // convert all the md files on every request. This is not optimal // but fast enough that we don't really need to care right now. - convert(); + if (!server.noconvert) { + convert(); + } next(); }) .use(reactMiddleware.provide(buildOptions)) @@ -49,5 +51,5 @@ var app = connect() var portToUse = port || 8080; var server = http.createServer(app); server.listen(portToUse); -console.log('Open http://localhost:' + portToUse + '/react-native/index.html'); +console.log('Open http://localhost:' + portToUse + '/react-native/_index.html'); module.exports = server;