mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05: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
No EOL
364 B
JavaScript
12 lines
No EOL
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);
|
|
}; |