mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
6b758bda79
refs #10124 - one clean v0.1 and v2 config file for routing! - solves one underlying bug reported in #10124 - the alias handling was just a hotfix to support v2 for the site - but it was hard to read, ugly - now we have two clean configs - we'll see how useful it is - need to do proper manual testing on Monday
71 lines
1.4 KiB
JavaScript
71 lines
1.4 KiB
JavaScript
/* eslint-disable */
|
|
module.exports.QUERY = {
|
|
tag: {
|
|
controller: 'tags',
|
|
type: 'read',
|
|
resource: 'tags',
|
|
options: {
|
|
slug: '%s',
|
|
visibility: 'public'
|
|
}
|
|
},
|
|
author: {
|
|
resourceAlias: 'authors',
|
|
controller: 'users',
|
|
type: 'read',
|
|
resource: 'users',
|
|
options: {
|
|
slug: '%s',
|
|
visibility: 'public'
|
|
}
|
|
},
|
|
user: {
|
|
resourceAlias: 'authors',
|
|
controller: 'users',
|
|
type: 'read',
|
|
resource: 'users',
|
|
options: {
|
|
slug: '%s',
|
|
visibility: 'public'
|
|
}
|
|
},
|
|
post: {
|
|
controller: 'posts',
|
|
type: 'read',
|
|
resource: 'posts',
|
|
options: {
|
|
slug: '%s',
|
|
status: 'published',
|
|
page: 0
|
|
}
|
|
},
|
|
page: {
|
|
controller: 'posts',
|
|
type: 'read',
|
|
resource: 'posts',
|
|
options: {
|
|
slug: '%s',
|
|
status: 'published',
|
|
page: 1
|
|
}
|
|
},
|
|
preview: {
|
|
controller: 'posts',
|
|
resource: 'posts'
|
|
}
|
|
};
|
|
|
|
module.exports.TAXONOMIES = {
|
|
tag: {
|
|
filter: 'tags:\'%s\'+tags.visibility:public',
|
|
editRedirect: '#/settings/tags/:slug/',
|
|
resource: 'tags'
|
|
},
|
|
author: {
|
|
filter: 'authors:\'%s\'',
|
|
editRedirect: '#/team/:slug/',
|
|
resource: 'authors'
|
|
}
|
|
};
|
|
/* eslint-enable */
|