2014-02-27 05:45:45 +01:00
|
|
|
/*global Ember */
|
2014-02-26 05:58:00 +01:00
|
|
|
|
2014-02-27 05:45:45 +01:00
|
|
|
// ensure we don't share routes between all Router instances
|
|
|
|
var Router = Ember.Router.extend();
|
|
|
|
|
2014-03-02 15:30:35 +01:00
|
|
|
Router.reopen({
|
2014-03-10 01:56:56 +01:00
|
|
|
location: 'history', // use HTML5 History API instead of hash-tag based URLs
|
2014-03-02 15:30:35 +01:00
|
|
|
rootURL: '/ghost/ember/' // admin interface lives under sub-directory /ghost
|
|
|
|
});
|
|
|
|
|
2014-02-27 05:45:45 +01:00
|
|
|
Router.map(function () {
|
2014-03-11 17:23:32 +01:00
|
|
|
this.route('login', { path: '/signin' });
|
2014-03-02 15:30:35 +01:00
|
|
|
this.resource('posts', { path: '/' }, function () {
|
2014-03-02 21:12:06 +01:00
|
|
|
this.route('post', { path: ':post_id' });
|
2014-03-02 15:30:35 +01:00
|
|
|
});
|
|
|
|
this.resource('editor', { path: '/editor/:post_id' });
|
|
|
|
this.route('new', { path: '/editor' });
|
2014-02-26 05:58:00 +01:00
|
|
|
});
|
2014-02-27 05:45:45 +01:00
|
|
|
|
|
|
|
export default Router;
|