react-snap icon indicating copy to clipboard operation
react-snap copied to clipboard

Add exclude option

Open stereobooster opened this issue 6 years ago • 10 comments

Feature Request

Is your feature request related to a problem? Please describe. Need a way to ignore some paths, especially when used together with crawl: true (default) option.

Describe the solution you'd like exclude option to ignore some paths. Exclude suppose to be an array of glob patterns.

For example:

  • pattern /a/b/c would ignore /a/b/c and /a/b/c/, but not /a/b/c/d.
  • pattern /a/b/c/* would ignore /a/b/c and /a/b/c/ and /a/b/c/d.

To avoid confusion there should be additional check for include option to check that people don't use glob patterns for include, and if they do there suppose to be a message explaining why it is not possible to use glob patterns for include.

To avoid confusion there should be additional check for include and exclude, so they don't have intersection, otherwise people can be confused, why some pages are not crawled, even so they present in include.

Describe alternatives you've considered list all required pages by and and disable crawl, which is not convenient

Teachability, Documentation, Adoption, Migration Strategy Option is backward compatible.

My concerns were that this option will be tricky for end users, but 2 additional checks (described above) should prevent confusion.

Related:

  • https://github.com/stereobooster/react-snap/pull/361
  • https://github.com/stereobooster/react-snap/pull/165
  • https://github.com/stereobooster/react-snap/issues/327

stereobooster avatar Apr 10 '19 18:04 stereobooster

The approach described above would be sufficient. This would make react-snap especially useful for web applications that only need the index to be static (e.g. a landing/marketing page for SEO) but where there is no need to have the rest of the application have snapshots.

ajeetd avatar Jul 06 '19 17:07 ajeetd

+1

AsheAustaire avatar Sep 11 '19 17:09 AsheAustaire

+1

calumbutler avatar Oct 10 '19 17:10 calumbutler

definitely need it

terrylks avatar Feb 04 '20 04:02 terrylks

Any update on this? It would really help to eliminate crawling of assets.

kpratik2015 avatar Feb 04 '20 06:02 kpratik2015

+1

celikkoseoglu avatar Jun 08 '20 22:06 celikkoseoglu

+1

GalaxysHub avatar Aug 12 '20 19:08 GalaxysHub

+1

rbirchtree avatar Aug 12 '20 19:08 rbirchtree

+1

omerg avatar Oct 02 '20 15:10 omerg

+1

dominusmi avatar Jan 16 '24 21:01 dominusmi