Documentation for CSL Plugins incorrect?
See original GitHub issueI think the CSL Plugins docs may need to change Cite.plugins.output.config.get('csl')
to Cite.plugins.config.get('@csl')
?
Similar to #161, I was getting undefined
errors whenever I tried to call Cite.plugins.config.get
. I was following the instructions in the CSL Plugins docs. After some struggling, I found Cite.plugins.list() under the plugins docs, used it, found that csl
is actually @csl
. I then tried to register my CSL template with Cite.plugins.config.get('@csl')
, and found it worked.
Here’s the full working code excerpt:
const references = fs.readFileSync('_input/citations/bib.json', 'utf8')
let cite = new Cite(references)
let stylesName = 'josh-csl'
let styles = fs.readFileSync('_input/citations/styles.csl', 'ascii')
Cite.plugins.config.get('@csl').templates.add(stylesName, styles)
var testCitation = cite.format('citation', {
format: 'html',
template: stylesName,
lang: 'en-US',
entry: ['wallace-wells2019']
})
console.log(testCitation)
citation-js@0.5.0-alpha.4, node v12.12.0, macOS 10.15
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Citation Language Style plugin bug: Issue year should have ...
The citation by the CSL plugins shows 2020 as publication year, but it should be 2019. They don't want to re-date the publication...
Read more >@citation-js/plugin-csl | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >An unexpected error occurred while installing .csl file
I disabled all add-ons and tried "Reset styles'' from Advanced > Files and foleders. I am using Zotero 5.0.96.3 on Win10. Can any...
Read more >How to reconfigure csl path? - xPilot - VATSIM Community
Within X-Plane, go to the Plugins menu and find xPilot and open the Settings window. Reference the xPilot documentation if you need further ......
Read more >Authors - Citation Style Language
We recommend first checking your software tool's documentation to learn their recommended way of finding and installing CSL styles. For instance, some tools ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems that
Cite.CSL.register.addTemplate()
works as well.Let’s carry this on in https://github.com/larsgw/citation.js/issues/219 if you want.