File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -383,9 +383,14 @@ export async function loadPageList(
383383
384384 if ( ! item . childPages ) return
385385 await Promise . all (
386- item . childPages . map (
387- async ( childPage : UnversionedTree ) => await addToCollection ( childPage , collection ) ,
388- ) ,
386+ item . childPages
387+ // Cross-product children are pages included from other parts of the
388+ // tree via absolute `/content/` paths in a bespoke landing page's
389+ // children list. They already exist in their original location, so
390+ // including them again would create duplicate entries in the flat
391+ // page list which breaks search-index uniqueness constraints.
392+ . filter ( ( childPage : UnversionedTree ) => ! childPage . crossProductChild )
393+ . map ( async ( childPage : UnversionedTree ) => await addToCollection ( childPage , collection ) ) ,
389394 )
390395 }
391396
You can’t perform that action at this time.
0 commit comments