Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify index name & directory from the command #75

Closed
bsubedi26 opened this issue May 31, 2018 · 2 comments
Closed

Specify index name & directory from the command #75

bsubedi26 opened this issue May 31, 2018 · 2 comments

Comments

@bsubedi26
Copy link

bsubedi26 commented May 31, 2018

I want to suggest a feature:

What is your use case for such a feature?

Hello, just came across this plugin and it has been very useful so far. I have a quick question: Is it possible to specify the algolia index name and the directory(s) you want to send to that index? Something similar to: jekyll algolia -index books -directory _books.

The main reason for this is there are collections that are pushed to separate algolia indices and the way its currently being done is via the _config.yml where we specify index_name and exclude the folders we do not want to include for that index. This becomes a hassle when you have more than a few indices you want to update. Please let me know if I am missing something or if there is a better way to do this.

@pixelastic
Copy link
Collaborator

Hello and thanks for the issue,

You can use the ALGOLIA_INDEX_NAME environment variable to define the name of the index, so ALGOLIA_INDEX_NAME=books jekyll algolia will push to the books index.

There is no command line option to specify the directories, though. I would suggest creating a different _config.yml file for each different use-case.

That being said, you could also push all your collections into the same index, and filter on a specific one using a facet. Authors, tags, categories and collections are automatically configured as usable for faceting.

Hope that helps :) Let me know if you'd like me to clarify any specific point.

@pixelastic
Copy link
Collaborator

@bsubedi26 Hope my previous answer helped you enough to move forward with your indexing of collection.

I'm going to close the issue, but feel free to comment back if there's anything I can clarify further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants