inukshuk / jekyll-scholar

jekyll extensions for the blogging scholar
MIT License
1.12k stars 102 forks source link

Can't use both `bibliography_count --cited` and `bibliography --cited` #283

Closed MarkTuddenham closed 4 years ago

MarkTuddenham commented 4 years ago

I want to add a heading if there are any citations:

{% capture bib_count %} {% bibliography_count --cited %} {% endcapture %}
<!-- convert to number  -->
{% assign bib_count = bib_count | plus: 0 %}

{% if bib_count > 0 %}
<div class="my_bib">
    <h4>References</h4>
    {% bibliography --cited %}
</div>
{% endif %}

However, this will not work because of the clear added in #90. The count in line 1 clears the list of citations and so {% bibliography --cited %} has nothing to display.

Clearing the list of citations seems, to me, to be unintuitive and is causing other people issues too (#229).

inukshuk commented 4 years ago

Point taken. I've added a new --clear switch to use in conjunction with --cited.