This library is useful for any linguist who uses Mendeley as their bibliography management software and would like to create a presentation format of their bibliography in Markdown or HTML.
Found a bug? Open an issue on GitHub.
Created and maintained by Daniel W. Hieber.
Getting Mendeley Data
Before using this library, you will need to get your Mendeley references in JSON format. Mendeley is a software and service for managing bibliographic sources. Once you have added references to your database, you can retrieve those references in JSON format using the Mendeley API.
The easiest way to get your Mendeley references into JSON format is by using Mendeley's API explorer. Simply log in with your Mendeley credentials, and you can make requests to the Mendeley API. Most likely you will want to make a
GET /documents request. You can then copy-paste the JSON data from the response.
You can also access the Mendeley API programmatically. See the Mendeley developer documentation for more information.
Important: Make sure that the
view parameter is set to
all when requesting documents, whether using the API programmatically or using the API explorer.
Start by getting your Mendeley references in JSON format (see above).
Install the library:
npm install -D ling-refyarn add --dev ling-ref
ling-ref exports a single function which converts a Mendeley reference to a citation in HTML:
// import the ling-ref library;// get your Mendeley documents in JSON formatconst references = ;// convert each reference to an HTML citationconst citations = references;// add the citations to your HTMLconst referenceList = document;citations;