inukshuk / jekyll-scholar

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

Unformatted reference #303

Open haji-ali opened 4 years ago

haji-ali commented 4 years ago

(Apologies for my many questions)

Is there a way to get an unformated {{reference}}? Devoid of html tags and html escapes characters? I don't want to remove the formatting completely, I want to have the two versions of the reference (one with and one without).

inukshuk commented 4 years ago

I don't think so. It would be easy to add this if you need it. You could add a second renderer instance with text format instead of html.

haji-ali commented 4 years ago

Is that doable in the config? Or do you mean by modifying utilities.rb?

I temporarily solved the issue with the strip_html filter, but I do think this would be a good functionality to have (I use the plain text version for a copy button).

I might have a crack at it at some point.

inukshuk commented 4 years ago

You'd have to modify jekyll-scholar, it's not possible to do this via the config unless I'm missing something.

The functionality to render plain text instead of HTML is definitely implemented by the citeproc renderer though: I think the easiest approach would be as outlined above to create a second renderer using the text output format, and render that output and then expose it along with the other reference data to the page.