mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
b066e732dd
fixes #2057 - uses express’ Route object to create RegExp’s that we use to check the incoming path - refactored structure of fronted controller single tests to be easier to read - amend regex to incorporate new allowed permalink structure
12 lines
364 B
JavaScript
12 lines
364 B
JavaScript
var frontend = require('../controllers/frontend');
|
|
|
|
module.exports = function (server) {
|
|
/*jslint regexp: true */
|
|
|
|
// ### Frontend routes
|
|
server.get('/rss/', frontend.rss);
|
|
server.get('/rss/:page/', frontend.rss);
|
|
server.get('/page/:page/', frontend.homepage);
|
|
server.get('/', frontend.homepage);
|
|
server.get('*', frontend.single);
|
|
}; |