algolia / algoliasearch-jekyll

⚠ DEPRECATED Use jekyll-algolia instead.
https://community.algolia.com/jekyll-algolia/
MIT License
125 stars 12 forks source link

Unable to exclude files from indexing based on directories #52

Closed robbiejaeger closed 7 years ago

robbiejaeger commented 7 years ago

I would like to exclude files from being indexed in my Jekyll site based on the directory the files are in. There are too many files in some directories to exclude them one-by-one. I have tried specifying this in my _config.yml file, but it does not seem to work:

algolia:
  excluded_files:
    - index.html
    - calendars/index.html
    - !ruby/regexp "/archive./"

archive is a directory at the root of my Jekyll project, and it contains many files. It would be great to exclude all of the files in archive using some kind of wildcard or regex.

robbiejaeger commented 7 years ago

I was overcomplicating things. I just needed:

algolia:
  excluded_files:
    - index.html
    - calendars/index.html
    - archive
pixelastic commented 7 years ago

Thanks for raising the issue, I might make the README clearer by adding this example into it.