diff --git a/src/build/streams/html.js b/src/build/streams/html.js index b52e959..d477503 100644 --- a/src/build/streams/html.js +++ b/src/build/streams/html.js @@ -104,66 +104,67 @@ exports.create = function (api, app, config, opts) { exports.IndexHTML = Class(function () { this.generate = function (api, app, config) { return Promise.try(function () { - return [ - '', - '', - ' ', - ' ' + app.manifest.title + '', - ' ', - '', - ' ', - '
', - ' ', - '
', - '', - ' ', - ' ', - '' - ].join('\n'); + + '" onresize="onResize()">'); + html.push('
'); + html.push(' '); + html.push('
'); + html.push(''); + html.push(' '); + html.push(' '); + html.push(')'); + return html.join('\n'); }); }; }); @@ -310,6 +311,7 @@ exports.GameHTML = Class(function () { app.manifest.title, '' ); + applyOpenGraphMetaProperties(html, config); // Targeting mobile browsers requires viewport settings. if (config.target === 'browser-mobile' || config.isSimulated) { @@ -398,3 +400,13 @@ exports.GameHTML = Class(function () { }); }; }); + + + +// add open graph meta properties to an array of HTML lines +function applyOpenGraphMetaProperties (html, config) { + var og = config.browser.openGraph; + for (var key in og) { + html.push(' '); + } +}; diff --git a/src/build/targets/browser/index.js b/src/build/targets/browser/index.js index 8c26f82..16f692f 100644 --- a/src/build/targets/browser/index.js +++ b/src/build/targets/browser/index.js @@ -75,6 +75,9 @@ exports.init = function (api, app, config) { appleTouchIcon: true, appleTouchStartupImage: true, + // rich social graph meta properties + openGraph: {}, + // embed fonts disabled by default (load over URL), if true, base64 encode // them into the css embedFonts: false,