mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
parent
16329ac6f0
commit
6a276668bc
2 changed files with 8 additions and 3 deletions
|
@ -4,6 +4,7 @@ var express = require('express'),
|
|||
_ = require('underscore'),
|
||||
colors = require("colors"),
|
||||
semver = require("semver"),
|
||||
slashes = require("connect-slashes"),
|
||||
errors = require('./server/errorHandling'),
|
||||
admin = require('./server/controllers/admin'),
|
||||
frontend = require('./server/controllers/frontend'),
|
||||
|
@ -246,15 +247,15 @@ when.all([ghost.init(), helpers.loadCoreHelpers(ghost)]).then(function () {
|
|||
// First determine whether we're serving admin or theme content
|
||||
server.use(manageAdminAndTheme);
|
||||
|
||||
// set the view engine
|
||||
server.set('view engine', 'hbs');
|
||||
|
||||
// Admin only config
|
||||
server.use('/ghost', whenEnabled('admin', express['static'](path.join(__dirname, '/client/assets'))));
|
||||
|
||||
// Theme only config
|
||||
server.use(whenEnabled(server.get('activeTheme'), express['static'](ghost.paths().activeTheme)));
|
||||
|
||||
// Add in all trailing slashes
|
||||
server.use(slashes());
|
||||
|
||||
server.use(express.favicon(__dirname + '/shared/favicon.ico'));
|
||||
server.use(express.bodyParser({}));
|
||||
server.use(express.bodyParser({uploadDir: __dirname + '/content/images'}));
|
||||
|
@ -266,6 +267,9 @@ when.all([ghost.init(), helpers.loadCoreHelpers(ghost)]).then(function () {
|
|||
// So on every request we actually clean out reduntant passive notifications from the server side
|
||||
server.use(cleanNotifications);
|
||||
|
||||
// set the view engine
|
||||
server.set('view engine', 'hbs');
|
||||
|
||||
// Initialise the views
|
||||
server.use(initViews);
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"dependencies": {
|
||||
"express": "3.3.4",
|
||||
"express-hbs": "0.2.2",
|
||||
"connect-slashes": "0.0.9",
|
||||
"node-polyglot": "0.2.1",
|
||||
"moment": "2.1.0",
|
||||
"underscore": "1.5.1",
|
||||
|
|
Loading…
Add table
Reference in a new issue