rjoberon / bibsonomy-jekyll

BibSonomy plugin for Jekyll
GNU General Public License v3.0
7 stars 6 forks source link

Allow rendering of liquid variables in parameters #2

Closed ptoews closed 6 years ago

ptoews commented 6 years ago

I'm very new to ruby so there might be room for improvements. Basically, if a parameter is surrounded by {{ and }} (without spaces), the inner text is interpreted as variable name and the parameter is replaced with its corresponding value. This allows parameters to be either constant values or liquid variables.

See #1

ptoews commented 6 years ago

The tests probably failed because the CI ENV is not set. My local tests failed at first too, until I hardcoded the bibsonomy name and api_key into spec_helper.rb.

rjoberon commented 6 years ago

The tests probably failed because the CI ENV is not set. My local tests failed at first too, until I hardcoded the bibsonomy name and api_key into spec_helper.rb.

Adding the credentials to the source code is not a good idea, as they'll easily land online. You can use environment variables to set user name and API key. I've documented this now at the bottom of the README, see https://github.com/rjoberon/bibsonomy-jekyll#development

rjoberon commented 6 years ago

Thank you for the pull request. I have implemented a similar solution.