File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ export const getAllRawPageMetadataQuery = (config: PageTreeConfig) => `*[_type i
5
5
config . pageSchemaTypes ,
6
6
)
7
7
. map ( key => `"${ key } "` )
8
- . join ( ', ' ) } ]]{
8
+ . join ( ', ' ) } ]
9
+ ${ config ?. filter && ` && ${ config . filter } ` }
10
+ ]{
9
11
${ rawPageMetadataFragment ( config ) }
10
12
}` ;
11
13
Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ export type PageTreeConfig = {
63
63
/* Adds validation check to ensure that the language of the document matches the language of the parent document. Default: false */
64
64
documentLanguageShouldMatchParent ?: boolean ;
65
65
} ;
66
+ /* An optional filter appended to the usePageTree groq query. Useful for removing pages based on data. */
67
+ filter ?: string ;
66
68
} ;
67
69
68
70
/**
You can’t perform that action at this time.
0 commit comments