Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use_raw_bibtex_entry option #274

Merged
merged 1 commit into from
Aug 28, 2019

Conversation

stevecheckoway
Copy link
Contributor

Jekyll 4 does not render Liquid markup from included BibTeX files any
longer. This obviates the need for adding {%raw%} around an entry's
bibtex field. Indeed, adding it causes {%raw%} and {%endraw%} to
appear in the output.

This commit adds a warning if the use_raw_bibtex_entry key appears in
the jekyll-scholar options, regardless of the value of the entry.

@stevecheckoway
Copy link
Contributor Author

This is a follow up to the discussion in #273.

Jekyll 4 does not render Liquid markup from included BibTeX files any
longer. This obviates the need for adding `{%raw%}` around an entry's
`bibtex` field. Indeed, adding it causes `{%raw%}` and `{%endraw%}` to
appear in the output.

This commit adds a warning if the `use_raw_bibtex_entry` key appears in
the jekyll-scholar options, regardless of the value of the entry.

Jekyll 4 requires at least Ruby 2.4 so increase the version numbers for
Travis.
@dirteat
Copy link

dirteat commented Oct 18, 2019

Hi there,
just updated to jekyll 4, I used to have use_raw_bibtex_entry to true and all things related to jekyll-scholar are now broken :(

For instance, I cannot make {% bibliography --file something.bib %} to work anymore, it seems to pick a random .bib file among the many I have.

Edit: More specifically, this does not work anymore:

{% bibliography --file {{ member.bibfile }} %}

I really do need to pass a variable to the option --file !

PS: I have already removed all yaml header in .bib file, which otherwise trigger errors with the {{}} bibtex entry.

Any advice welcome, I cannot find anything in the changelog that would explain this.
Thanks!

@stevecheckoway
Copy link
Contributor Author

@dirteat it's probably best to file an issue.

I'm a little surprised that ever worked though. My recollection of how Liquid markup works is that your updated example should call whichever function was registered for bibliography and then it would get --file {{ member.bibfile }} as an argument and it would be responsible for parsing that. In particular, I wouldn't expect it to do more liquid rendering on it to produce a file name.

@dirteat
Copy link

dirteat commented Oct 18, 2019

Ok, I'll open a new issue.
I reverted back to jekyll 3.8.6 and jekyll-scholar 5.16.0, and that really works.

The website is actually: https://curl.group

you can check the output on "members" menu, each get his own biblio generated by
{% bibliography --file {{ member.bibfile }} %}
where member.bibfile is defined in some markdown text file for each "member".

@inukshuk
Copy link
Owner

My recollection of how Liquid markup works is that your updated example should call whichever function was registered for bibliography and then it would get --file {{ member.bibfile }} as an argument and it would be responsible for parsing that. In particular, I wouldn't expect it to do more liquid rendering on it to produce a file name.

Yes, jekyll-scholar interpolates the parameters additionally.

This is probably unrelated to the raw bibtex option? Or is the whole thing {% bibliography ... %} embedded in a bibtex file?

@dirteat
Copy link

dirteat commented Oct 18, 2019

You're right, it is unrelated to raw bibtex; I deactivated the option in scholar 5.16.0 / jekyll 3.8.6 and everything works fine. The whole thing is in a layout, not in a bibtex file. I've open a new issue about it.

@inukshuk
Copy link
Owner

Hmm, it's possible that the fact that it is in the layout is the cause of the problem. Maybe jekyll changed something about the way the layout is evaluated. You say above that the interpolation happens just once (one file is picked) so maybe that's some kind of optimization jekyll does: render that part of the layout and then re-use the result. You would have to make sure that this part of the layout is rendered every time the member variable changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants