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
|
||||
.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}`));
|
||||
|
||||
Reference in New Issue
Block a user