diff --git a/.gitignore b/.gitignore index 36976c999b..a487fdcf10 100644 --- a/.gitignore +++ b/.gitignore @@ -123,7 +123,6 @@ test/coverage # Built asset files /core/built /core/server/web/admin/views/*.html -!/core/server/web/admin/views/preview.html /core/server/public/ghost.min.css # Caddyfile - for local development with ssl + caddy diff --git a/core/server/web/admin/app.js b/core/server/web/admin/app.js index ba55559dfa..3b6388a038 100644 --- a/core/server/web/admin/app.js +++ b/core/server/web/admin/app.js @@ -6,14 +6,11 @@ const constants = require('@tryghost/constants'); const urlUtils = require('../../../shared/url-utils'); const shared = require('../shared'); const adminMiddleware = require('./middleware'); -const preview = require('./preview'); module.exports = function setupAdminApp() { debug('Admin setup start'); const adminApp = express('admin'); - adminApp.use('/preview', preview); - // Admin assets // @TODO ensure this gets a local 404 error handler const configMaxAge = config.get('caching:admin:maxAge'); diff --git a/core/server/web/admin/preview.js b/core/server/web/admin/preview.js deleted file mode 100644 index 225e30cd6a..0000000000 --- a/core/server/web/admin/preview.js +++ /dev/null @@ -1,15 +0,0 @@ -const path = require('path'); -const config = require('../../../shared/config'); - -function servePreview(req, res, next) { - if (req.path === '/') { - const templatePath = path.resolve(config.get('paths').adminViews, 'preview.html'); - return res.sendFile(templatePath); - } - - next(); -} - -module.exports = [ - servePreview -]; diff --git a/core/server/web/admin/views/preview.html b/core/server/web/admin/views/preview.html deleted file mode 100644 index 180e02ad1f..0000000000 --- a/core/server/web/admin/views/preview.html +++ /dev/null @@ -1,53 +0,0 @@ -