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:
@@ -47,6 +47,7 @@ async function getContentItems() {
|
|||||||
const posts = client
|
const posts = client
|
||||||
.getContentItems({
|
.getContentItems({
|
||||||
collection: 'posts',
|
collection: 'posts',
|
||||||
|
limit: Infinity,
|
||||||
})
|
})
|
||||||
.then((response) => response.items)
|
.then((response) => response.items)
|
||||||
.then((posts) => posts.map((post) => `/blog/${post.slug}`));
|
.then((posts) => posts.map((post) => `/blog/${post.slug}`));
|
||||||
@@ -54,6 +55,7 @@ async function getContentItems() {
|
|||||||
const docs = client
|
const docs = client
|
||||||
.getContentItems({
|
.getContentItems({
|
||||||
collection: 'documentation',
|
collection: 'documentation',
|
||||||
|
limit: Infinity,
|
||||||
})
|
})
|
||||||
.then((response) => response.items)
|
.then((response) => response.items)
|
||||||
.then((docs) => docs.map((doc) => `/docs/${doc.slug}`));
|
.then((docs) => docs.map((doc) => `/docs/${doc.slug}`));
|
||||||
|
|||||||
Reference in New Issue
Block a user