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({
2020 * @default ""
2121 */
2222 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 ( ) ,
2429 /**
2530 * Selector to grab the inner text from
2631 * @example ".docs-builder-container"
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ export async function crawl(config: Config) {
9292 await enqueueLinks ( {
9393 globs :
9494 typeof config . match === "string" ? [ config . match ] : config . match ,
95+ exclude :
96+ typeof config . exclude === "string" ? [ config . exclude ] : config . exclude ?? [ ] ,
9597 } ) ;
9698 } ,
9799 // Comment this option to scrape the full website.
You can’t perform that action at this time.
0 commit comments