Optimize content fetching and update configurations
Content fetching in the marketing section has been refactored to utilize the Next.js cache, which significantly improves performance. The date format of publishedAt has been updated to be more consistent across files. Code related to CSRF token, fonts, and metadata has been refactored into separate files for easier maintenance and readability.
This commit is contained in:
@@ -16,8 +16,6 @@ export class KeystaticClient implements CmsClient {
|
||||
|
||||
const docs = await reader.collections[collection].all();
|
||||
|
||||
console.log(docs);
|
||||
|
||||
const startOffset = options?.offset ?? 0;
|
||||
const endOffset = startOffset + (options?.limit ?? 10);
|
||||
|
||||
@@ -144,7 +142,7 @@ export class KeystaticClient implements CmsClient {
|
||||
url: item.slug,
|
||||
slug: item.slug,
|
||||
description: item.entry.description,
|
||||
publishedAt,
|
||||
publishedAt: publishedAt.toISOString(),
|
||||
content,
|
||||
image: item.entry.image ?? undefined,
|
||||
categories:
|
||||
|
||||
Reference in New Issue
Block a user