mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Finished to move the frontend to themes v4
issue https://github.com/TryGhost/Team/issues/221
This commit is contained in:
parent
b5e85c55dc
commit
26e20d223d
3 changed files with 56 additions and 2 deletions
2
core/frontend/services/routing/bootstrap.js
vendored
2
core/frontend/services/routing/bootstrap.js
vendored
|
@ -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;
|
||||
|
|
54
core/frontend/services/routing/config/v4.js
Normal file
54
core/frontend/services/routing/config/v4.js
Normal file
|
@ -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 */
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"ghost-api": "v3"
|
||||
"ghost-api": "v4"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue