mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 06:12:03 +03:00
5e5b90ac29
refs #9192 - Introduces a url service that can be initialised - Added a concept of Resources and resource config.json that contains details about the resources in the system that we may want to make customisable - Note that individual resources know how to create their own Urls... this is important for later - Url Service loads all of the resources, and stores their URLs - The UrlService binds to all events, so that when a resource changes its url and related data can be updated if needed - There is a temporary config guard so that this can be turned off easily
56 lines
1.4 KiB
JSON
56 lines
1.4 KiB
JSON
[
|
|
{
|
|
"name": "post",
|
|
"api" : "posts",
|
|
"prefetchOptions": {
|
|
"filter": "visibility:public+status:published+page:false",
|
|
"include": "author,tags"
|
|
},
|
|
"events": {
|
|
"post.published": "add",
|
|
"post.published.edited": "update",
|
|
"post.unpublished": "remove",
|
|
"settings.permalinks.edited": "reload"
|
|
}
|
|
},
|
|
{
|
|
"name": "page",
|
|
"api" : "posts",
|
|
"prefetchOptions": {
|
|
"filter": "visibility:public+status:published+page:true",
|
|
"include": "author,tags"
|
|
},
|
|
"urlLookup": "post",
|
|
"events": {
|
|
"page.published": "add",
|
|
"page.published.edited": "update",
|
|
"page.unpublished": "remove"
|
|
}
|
|
},
|
|
{
|
|
"name": "tag",
|
|
"api" : "tags",
|
|
"prefetchOptions": {
|
|
"filter": "visibility:public"
|
|
},
|
|
"events": {
|
|
"tag.added": "add",
|
|
"tag.edited": "update",
|
|
"tag.deleted": "remove"
|
|
|
|
}
|
|
},
|
|
{
|
|
"name": "author",
|
|
"api" : "users",
|
|
"prefetchOptions": {
|
|
"filter": "visibility:public"
|
|
},
|
|
"events": {
|
|
"user.activated": "add",
|
|
"user.activated.edited": "update",
|
|
"user.deactivated": "remove"
|
|
}
|
|
}
|
|
]
|