As Jekyll-Scholar is not available on Github Pages, I am trying to find a workaround to have some kind of bibliography features, using kramdown footnotes and include. I would like to stay in the Github Pages workflow and not to compile the website locally.
I have a collection with all references in _data/biblio.yaml:
- authors: Me, Her and Him title: A Serious Article key: ref1 In page1.md I have:
This is a sentence with a citation[^1] [^1]: {% include citation.html key="ref1" %} And in _includes/citation.html I have a template for citations:
{% assign citation = site.data.biblio | where:"key", include.key | first %} <span class="cit-authors">{{citation.authors}}</span>, <span class="cit-title">{{citation.title}}</span> This does not work, as after compilation the citation is rendered before and not inside the footnote definition:
<p> <span class="cit-authors">Me, Her and Him</span>, <span class="cit-title">A Serious Article</span> </p> <div class="footnotes"> <ol> <li id="fn:1"> <p><a href="#fnref:1" class="reversefootnote">↩</a></p> </li> </ol> </div> The desired result is obviously to have the included content inside the <li> block.
Is there a reason why this does not work? Is there any way to make it work as desired?