citation.js-showdown
Showdown extension for Citation.js.
Install
Node.js
npm install citation-js-showdown
Browser
Download this file.
Use
Node.js
First, load showdown:
const Showdown =
Second, register extension:
Third, use extension in the showdown converter:
const converter = extensions: 'citation.js'
Now you can use the converter like you normally would.
Browser
Now you can use the converter like you normally would.
Syntax
^[<INPUT>]
Where <INPUT>
is any string that can be inputted to Cite
, omitting
the quotes. Arrays may not work currently, see todos.
Todo
- Sorting based on IDs
- Add support for
^[<AUTHOR>, <YEAR>, <TITLE>, <ETC>]
syntax - DOI input (actually a todo for Citation.js; if support for DOI is added there, it will automatically work here, assuming I update the dependencies)
- Work async (Citation.js will probably be at least partly async soon). Requires either:
- a hack in whatever program you're rendering the HTML in; or
- async support in showdown
- Configuration
- output options available in Citation.js (assuming we want formatted citations that's only style and language)
- Wikipedia-style references (i.e. [1]) or following style guides (i.e. (Willighagen, 2017))