Set limit to Infinity in getContentItems calls

Added a limit parameter with a value of Infinity to the getContentItems calls for 'posts' and 'documentation' collections. This ensures all items are retrieved without any restrictions.
This commit is contained in:
gbuomprisco
2024-08-11 12:15:33 +02:00
parent babdecb78f
commit 3d7a7c6ce8

View File

@@ -47,6 +47,7 @@ async function getContentItems() {
const posts = client
.getContentItems({
collection: 'posts',
limit: Infinity,
})
.then((response) => response.items)
.then((posts) => posts.map((post) => `/blog/${post.slug}`));
@@ -54,6 +55,7 @@ async function getContentItems() {
const docs = client
.getContentItems({
collection: 'documentation',
limit: Infinity,
})
.then((response) => response.items)
.then((docs) => docs.map((doc) => `/docs/${doc.slug}`));