mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
20f102808a
fixes #6247 - GQL has a bug where literals starting with numbers are incorrectly parsed - Using strings instead of literals is a workaround, but is probably safer anyway
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
var _ = require('lodash'),
|
|
config = require('../../config'),
|
|
getConfig;
|
|
|
|
getConfig = function getConfig(name) {
|
|
var defaults = {
|
|
index: {
|
|
name: 'index',
|
|
route: '/',
|
|
frontPageTemplate: 'home'
|
|
},
|
|
tag: {
|
|
name: 'tag',
|
|
route: '/' + config.routeKeywords.tag + '/:slug/',
|
|
postOptions: {
|
|
filter: 'tags:\'%s\''
|
|
},
|
|
data: {
|
|
tag: {
|
|
type: 'read',
|
|
resource: 'tags',
|
|
options: {slug: '%s'}
|
|
}
|
|
},
|
|
slugTemplate: true
|
|
},
|
|
author: {
|
|
name: 'author',
|
|
route: '/' + config.routeKeywords.author + '/:slug/',
|
|
postOptions: {
|
|
filter: 'author:\'%s\''
|
|
},
|
|
data: {
|
|
author: {
|
|
type: 'read',
|
|
resource: 'users',
|
|
options: {slug: '%s'}
|
|
}
|
|
},
|
|
slugTemplate: true
|
|
}
|
|
};
|
|
|
|
return _.cloneDeep(defaults[name]);
|
|
};
|
|
|
|
module.exports = getConfig;
|