| # @citation-js/plugin-wikidata | |
| Plugin for Wikidata for Citation.js. | |
| [](https://npmjs.org/package/@citation-js/plugin-wikidata) | |
| [](https://npmcharts.com/compare/@citation-js%2Fplugin-wikidata?minimal=true) | |
|  | |
|  | |
| --- | |
| ## Install | |
| npm install @citation-js/plugin-wikidata | |
| ## Usage | |
| Register by importing the package: | |
| ```js | |
| require('@citation-js/plugin-wikidata') | |
| ``` | |
| ## Formats | |
| Formats and other features added by this plugin. | |
| ### Input | |
| This plugin accepts [Wikidata](https://wikidata.org) IDs in the following formats: | |
| * `@wikidata/id`: single ID | |
| * `@wikidata/list+text`: whitespace- or comma-delimited list of IDs | |
| * `@wikidata/api`: API URL | |
| * `@wikidata/url`: entity URL | |
| * `@wikidata/list+object`: array of IDs | |
| API responses (`@wikidata/object`) are also supported. Additionally, this plugin exposes input parsing methods concerning individual properties and types, under the types `@wikidata/prop` and `@wikidata/type`. | |
| ### Configuration | |
| Input languages can be specified: | |
| ```js | |
| const {plugins} = require('@citation-js/core') | |
| const config = plugins.config.get('@wikidata') | |
| config.langs // ['en'] | |
| config.langs = ['fr', 'de', 'en'] // searches for French, then German then English labels | |
| ``` | |
Xet Storage Details
- Size:
- 1.55 kB
- Xet hash:
- 98b951f654136c022aaaece0186dca8e06b3066e777b3c792171cf9feb499d45
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.