mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
078f464197
covers 90% of #755 - moved ghost.settings to api.settings - moved ghost.notifications to api.notifications - split up api/index.js to notifications.js, posts.js, settings.js, tags.js and users.js - added instance.globals as temp workaround for blogglobals (Known issue: blog title and blog description are updated after restart only) - added webroot to config() to remove `var root = ...` - changed `e` and `url` helper to async - updated tests
15 lines
531 B
JavaScript
15 lines
531 B
JavaScript
var frontend = require('../controllers/frontend'),
|
|
api = require('../api');
|
|
module.exports = function (server) {
|
|
// ### Frontend routes
|
|
/* TODO: dynamic routing, homepage generator, filters ETC ETC */
|
|
server.get('/rss/', frontend.rss);
|
|
server.get('/rss/:page/', frontend.rss);
|
|
server.get('/page/:page/', frontend.homepage);
|
|
server.get('/', frontend.homepage);
|
|
|
|
api.settings.read('permalinks').then(function (permalinks) {
|
|
server.get(permalinks.value, frontend.single);
|
|
});
|
|
};
|