Ghost/core/server/services/url/config.json
Hannah Wolfe 5e5b90ac29
Added Url Service to track all URLs in the system (#9247)
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
2017-11-16 13:03:24 +00:00

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"
}
}
]