fix(seo): correct sitemap routes
This commit is contained in:
@@ -20,3 +20,18 @@ const previewPublicationQuery = Object.freeze({
|
||||
export function getPublicationQueryOptions(isPreview: boolean): PublicationQueryOptions {
|
||||
return isPreview ? previewPublicationQuery : publicPublicationQuery
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an explicit status predicate for public indexes such as sitemaps while
|
||||
* retaining the same anonymous access and draft behavior as public routes.
|
||||
*/
|
||||
export function getPublicPublishedQueryOptions() {
|
||||
return {
|
||||
...getPublicationQueryOptions(false),
|
||||
where: {
|
||||
_status: {
|
||||
equals: 'published' as const,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user