File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,12 @@ export const configSchema = z.object({
20
20
* @default ""
21
21
*/
22
22
match : z . string ( ) . or ( z . array ( z . string ( ) ) ) ,
23
-
23
+ /**
24
+ * Pattern to match against for links on a page to exclude from crawling
25
+ * @example "https://www.builder.io/c/docs/**"
26
+ * @default ""
27
+ */
28
+ exclude : z . string ( ) . or ( z . array ( z . string ( ) ) ) . optional ( ) ,
24
29
/**
25
30
* Selector to grab the inner text from
26
31
* @example ".docs-builder-container"
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ export async function crawl(config: Config) {
92
92
await enqueueLinks ( {
93
93
globs :
94
94
typeof config . match === "string" ? [ config . match ] : config . match ,
95
+ exclude :
96
+ typeof config . exclude === "string" ? [ config . exclude ] : config . exclude ?? [ ] ,
95
97
} ) ;
96
98
} ,
97
99
// Comment this option to scrape the full website.
You can’t perform that action at this time.
0 commit comments