Browse Source

Merge PR#30: Add missing HTML5 doctype

Konstantin Tarkus 9 years ago
parent
commit
fbe1e9293d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/render.js

+ 1 - 1
tools/render.js

@@ -40,7 +40,7 @@ async function renderPage(page, component) {
     body: ReactDOM.renderToString(component),
   };
   const file = join(__dirname, '../build', page.file.substr(0, page.file.lastIndexOf('.')) + '.html');
-  const html = ReactDOM.renderToStaticMarkup(<Html debug={DEBUG} {...data} />);
+  const html = '<!doctype html>\n' + ReactDOM.renderToStaticMarkup(<Html debug={DEBUG} {...data} />);
   await fs.mkdir(dirname(file));
   await fs.writeFile(file, html);
 }