Skip to content

Commit

Permalink
Finished to move the frontend to themes v4
Browse files Browse the repository at this point in the history
  • Loading branch information
tpatel committed Feb 23, 2021
1 parent b5e85c5 commit 26e20d2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/frontend/services/routing/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PreviewRouter = require('./PreviewRouter');
const ParentRouter = require('./ParentRouter');
const UnsubscribeRouter = require('./UnsubscribeRouter');

const defaultApiVersion = 'v3';
const defaultApiVersion = 'v4';

const registry = require('./registry');
let siteRouter;
Expand Down
54 changes: 54 additions & 0 deletions core/frontend/services/routing/config/v4.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* eslint-disable */
module.exports.QUERY = {
tag: {
controller: 'tagsPublic',
type: 'read',
resource: 'tags',
options: {
slug: '%s',
visibility: 'public'
}
},
author: {
controller: 'authorsPublic',
type: 'read',
resource: 'authors',
options: {
slug: '%s'
}
},
post: {
controller: 'postsPublic',
type: 'read',
resource: 'posts',
options: {
slug: '%s'
}
},
page: {
controller: 'pagesPublic',
type: 'read',
resource: 'pages',
options: {
slug: '%s'
}
},
preview: {
controller: 'preview',
resource: 'preview'
}
};

module.exports.TAXONOMIES = {
tag: {
filter: 'tags:\'%s\'+tags.visibility:public',
editRedirect: '#/tags/:slug/',
resource: 'tags'
},
author: {
filter: 'authors:\'%s\'',
editRedirect: '#/staff/:slug/',
resource: 'authors'
}
};
/* eslint-enable */
2 changes: 1 addition & 1 deletion core/frontend/services/themes/engines/defaults.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ghost-api": "v3"
"ghost-api": "v4"
}

0 comments on commit 26e20d2

Please sign in to comment.