diff --git a/libs/blog/feature-article/src/lib/blog-article.component.html b/libs/blog/feature-article/src/lib/blog-article.component.html index 8a4f164..9e0c33c 100644 --- a/libs/blog/feature-article/src/lib/blog-article.component.html +++ b/libs/blog/feature-article/src/lib/blog-article.component.html @@ -30,7 +30,7 @@ } -
+

= async (options) => { const defaultQuery: { [key: string]: string } = { content_type: 'article', limit: options.limit?.toString() ?? '10', - order: options.order ?? '-sys.createdAt', + order: options.order ?? '-fields.publishedAt', }; const entries = await cdaClient.getEntries(defaultQuery); const routes = entries.items.map( (entry) => - `/blog/${entry.sys.createdAt.split('T')[0]}-${entry.fields['slug']}`, + `/blog/${(entry.fields['publishedAt'] as string).split('T')[0]}-${entry.fields['slug']}`, ); const routesString = routes.join('\n');