@@ -370,8 +370,8 @@ async function searchButterCMSPages(
370370 setStatus (` Fetching pages of type "${pageTypeParam }"... ` , ' info' , true )
371371
372372 while (hasMore ) {
373- const previewParam = store .includePreview ? ' &preview=true ' : ' '
374- const url = ` ${baseUrl }/${pageTypeParam }/?auth_token=${token }&page=${page }&page_size=100${previewParam } `
373+ const previewParam = store .includePreview ? ' &preview=1 ' : ' '
374+ const url = ` ${baseUrl }/${pageTypeParam }/?auth_token=${token }&page=${page }&page_size=100&levels=5&order=title ${previewParam } `
375375
376376 try {
377377 const data = await fetchWithRetry (url )
@@ -435,7 +435,7 @@ async function searchButterCMSBlog(token: string, searchString: string): Promise
435435 setStatus (' Fetching blog posts...' , ' info' , true )
436436
437437 while (hasMore ) {
438- const previewParam = store .includePreview ? ' &preview=true ' : ' '
438+ const previewParam = store .includePreview ? ' &preview=1 ' : ' '
439439 const url = ` ${baseUrl }/?auth_token=${token }&page=${page }&page_size=100${previewParam } `
440440
441441 try {
@@ -504,8 +504,8 @@ async function searchButterCMSCollections(
504504 setStatus (` Fetching collection "${collectionKeyParam }"... ` , ' info' , true )
505505
506506 while (hasMore ) {
507- const previewParam = store .includePreview ? ' &preview=true ' : ' '
508- const url = ` ${baseUrl }/${collectionKeyParam }/?auth_token=${token }&page=${page }&page_size=100${previewParam } `
507+ const previewParam = store .includePreview ? ' &preview=1 ' : ' '
508+ const url = ` ${baseUrl }/${collectionKeyParam }/?auth_token=${token }&page=${page }&page_size=100&levels=5&order=title ${previewParam } `
509509
510510 try {
511511 const data = await fetchWithRetry (url )
0 commit comments