algolia / algoliasearch-jekyll

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

Add support for API write key in a config file #30

Closed nhoizey closed 8 years ago

nhoizey commented 8 years ago

I use several Jekyll plugins that take API keys from a config file instead of environment variables. Not the default _config.yml, which is often tracked in the versioning system, but another that is not tracked.

I have a _config_credentials.yml file for example, and I run Jekyll commands like this:

bundle exec jekyll build --config _config.yml,_config_credentials.yml

Would this be possible here?

pixelastic commented 8 years ago

You can already create a file named _algolia_api_key (that contains your API key) in the same directory than your _config.yml and the plugin will pick it up.

Would that work for you?

nhoizey commented 8 years ago

I saw this in the doc, but it would be easier for me to have all credentials in one single YAML file.

An example is the Twitter plugin: https://github.com/rob-murray/jekyll-twitter-plugin#credentials

I can do without it of course, it's just a matter of convenience… ;-)

pixelastic commented 8 years ago

I think having two configuration files (one to be commited and one to be left out) would be too confusing for users. I'd rather stay with the _algolia_api_key file and the explicit note about not committing it.