inukshuk / jekyll-scholar

jekyll extensions for the blogging scholar
MIT License
1.13k stars 101 forks source link

Filter condition with set membership #328

Closed afspies closed 3 years ago

afspies commented 3 years ago

Hi,

I am trying to use a filter query of the form

{% bibliography --query @article[{{selected_tags}} subset of tags] %}

where tags is a field in the bilbiography entries as tags={tag1,tag2...},

Is there some convenient way of implementing this through filtering, or do I need to do this check in the bibtemplate directly to apply the tag selection?

Thank you!

Alex

inukshuk commented 3 years ago

Unfortunately the query language currently does not support tests for set membership. However you can use variables in query parameter, so you could construct suitable queries either using multiple tests conjoined with || or by creating a regular expression made up of all the selected tags.

afspies commented 3 years ago

Great, using || should suffice - Thank you! :)