diff --git a/core/client/router.js b/core/client/router.js index b1fae37578..45bcf39fd1 100644 --- a/core/client/router.js +++ b/core/client/router.js @@ -1,11 +1,12 @@ /*global Ember */ +import ghostPaths from 'ghost/utils/ghost-paths'; // ensure we don't share routes between all Router instances var Router = Ember.Router.extend(); Router.reopen({ location: 'trailing-history', // use HTML5 History API instead of hash-tag based URLs - rootURL: '/ghost/ember/' // admin interface lives under sub-directory /ghost + rootURL: ghostPaths().subdir + '/ghost/ember/' // admin interface lives under sub-directory /ghost }); Router.map(function () { diff --git a/core/server/helpers/index.js b/core/server/helpers/index.js index e3fc0f56f4..5895adfae9 100644 --- a/core/server/helpers/index.js +++ b/core/server/helpers/index.js @@ -31,6 +31,11 @@ var downsize = require('downsize'), 'templates.js', 'models.js', 'views.js' + ], + ember: [ + 'vendor-ember.js', + 'templates-ember.js', + 'ghost-dev-ember.js' ] }; @@ -357,6 +362,19 @@ coreHelpers.ghost_script_tags = function () { return scriptList.join(''); }; +coreHelpers.ember_script_tags = function () { + var scriptList = scriptFiles.ember; + + scriptList = _.map(scriptList, function (fileName) { + return scriptTemplate({ + source: config().paths.subdir + '/ghost/scripts/' + fileName, + version: coreHelpers.assetHash + }); + }); + + return scriptList.join(''); +}; + /* * Asynchronous Theme Helpers (Registered with registerAsyncThemeHelper) */ @@ -811,6 +829,8 @@ registerHelpers = function (adminHbs, assetHash) { registerAdminHelper('ghost_script_tags', coreHelpers.ghost_script_tags); + registerAdminHelper('ember_script_tags', coreHelpers.ember_script_tags); + registerAdminHelper('file_storage', coreHelpers.file_storage); registerAdminHelper('apps', coreHelpers.apps); diff --git a/core/server/views/default-ember.hbs b/core/server/views/default-ember.hbs index 4c681d13d6..654b06ade1 100644 --- a/core/server/views/default-ember.hbs +++ b/core/server/views/default-ember.hbs @@ -35,9 +35,7 @@
- - - + {{{ember_script_tags}}}