Open HughP opened 4 years ago
Implementing CSL (from JSON, which is a nice idea) would be very powerful, but I’m not sure if it's even possible given the declarative <if>
/ <else>
blocks in the XML.
It may be possible, but it would be extremely verbose to implement and would imply re-writing a CSL implementation in Go/HTML syntax, almost certainly a no-go.
Is there a possibility of getting a config option or switch of some sort so that Hugo-cite
can have more than one style? I like chicago more than APA, and would work on an implementation, but need a way to declare one style over the other,
Actually I see that there already is a way to declare one citation style over another in the cite
shortcode. But I am thinking more globally, though I guess it doesn't really matter where the setting is... being a theme I would think it would be in a config.toml
file.
If I wanted to contribute another style how would this project enable a site designer to pick between the styles?
CSL is in XML. Hugo has no capacity to read XML. Have you thought about any possibilities of converting the CSL.xml files to say something like CSV or JSON so they can be used in hugo? I'm brain storming and trying to figure out how this might work.
I used: https://www.convertjson.com/xml-to-json.htm to convert the APA csl.xml file to json from XML https://www.zotero.org/styles/apa-5th-edition
this would essentially make all the CSL variables "available" in JOSN, then we would just need to process these into Hugo or a defined html?