Update language setting and versions in several packages
This commit includes an update of the language setting in the DocsPage and BlogPage functions in the marketing app to make it more dynamic. Additionally, the package versions of next, @makerkit/data-loader-supabase-nextjs, and various Next packages in the Supabase package have been updated.
This commit is contained in:
@@ -23,7 +23,7 @@ export class KeystaticClient implements CmsClient {
|
||||
const endOffset = startOffset + (options?.limit ?? 10);
|
||||
|
||||
const filtered = docs.filter((item) => {
|
||||
const categoryMatch = options?.categories
|
||||
const categoryMatch = options?.categories?.length
|
||||
? options.categories.find((category) =>
|
||||
item.entry.categories.includes(category),
|
||||
)
|
||||
@@ -33,7 +33,13 @@ export class KeystaticClient implements CmsClient {
|
||||
return false;
|
||||
}
|
||||
|
||||
const tagMatch = options?.tags
|
||||
if (options.language) {
|
||||
if (item.entry.language && item.entry.language !== options.language) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const tagMatch = options?.tags?.length
|
||||
? options.tags.find((tag) => item.entry.tags.includes(tag))
|
||||
: true;
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ function createKeyStaticConfig(path: string) {
|
||||
label: 'Parent',
|
||||
collection: 'posts',
|
||||
}),
|
||||
language: fields.text({ label: 'Language' }),
|
||||
order: fields.number({ label: 'Order' }),
|
||||
content: fields.document({
|
||||
label: 'Content',
|
||||
@@ -83,6 +84,7 @@ function createKeyStaticConfig(path: string) {
|
||||
description: fields.text({ label: 'Description' }),
|
||||
publishedAt: fields.date({ label: 'Published At' }),
|
||||
order: fields.number({ label: 'Order' }),
|
||||
language: fields.text({ label: 'Language' }),
|
||||
parent: fields.relationship({
|
||||
label: 'Parent',
|
||||
collection: 'documentation',
|
||||
|
||||
Reference in New Issue
Block a user