Citoid/Enabling Citoid on your wiki

Citoid is an auto-filled citation generator which automatically creates a templated citation from online sources based on a URL or some academic reference IDs like DOIs, PMIDs, or PMCIDs. Support for ISBNs is planned. It is currently available as a VisualEditor feature, but it will be available in the wikitext editor in the future.

Step 1: enabling Citoid
To enable it for your WMF wiki, you first need to enable VisualEditor's Citation Tool, if that hasn't already been done.

Step 2: configuring Citoid
The citoid extension must be configured using special TemplateData maps and a special citoid-specific message.

Step 2.a: configuring a special MediaWiki message
You'll need to configure a special MediaWiki: namespace message, MediaWiki:Citoid-template-type-map.json. This message maps the native citoid types (website, book, journalArticle) to the appropriate template (Cite web, Cite book, Cite journal). You should match a template to every single citoid type; there is no default behaviour if no template is matched to a particular type. It's better to have a bad match (there may be some fields in common between video liner notes and a book, or video liner notes and a video, for example) than none at all.

You may consider using en wiki's Template:Citation as a catch-all for types where there is no good type match as it is designed for this situation.

A sample namespace message is found here: Citoid/MediaWiki:Citoid-template-type-map.json.

Step 2.b: Ensure each template specified in MediaWiki:Citoid-template-type-map.json has a 'citoid' maps value
Since Citoid has its own set of fields for each document type (for instance, the journal name is called 'publicationTitle' in citoid, but 'journal' in Template:Cite_journal), each Template must have TemplateData defined that creates a map between citoid's fields and the Template's field. Calling the map 'citoid' lets the citoid extension know which map to look for. If the map 'citoid' doesn't suit your purposes for use with say, a userscript, you may create a citoid service related map that is called something else; an unlimited number of maps with unique keys are allowed in the maps object. Note that you can only see TemplateData maps in edit mode; they are not visible in the TemplateData table.

The most up-to-date maps objects that are compatible with the citoid extension are on the beta version of Wikipedia:
 * http://en.wikipedia.beta.wmflabs.org/wiki/Template:Cite_news/doc
 * http://en.wikipedia.beta.wmflabs.org/wiki/Template:Cite_journal/doc
 * http://en.wikipedia.beta.wmflabs.org/wiki/Template:Cite_web/doc
 * http://en.wikipedia.beta.wmflabs.org/wiki/Template:Cite_book/doc
 * http://en.wikipedia.beta.wmflabs.org/wiki/Template:Citation/doc

Troubleshooting

 * Main: Citoid

The new cite button does not appear in the toolbar
The previous cite drop-down menu should be replaced by a new button for the inspector in the toolbar menu. If the icon does not appear in the toolbar, it most likely means there's a problem with MediaWiki:Citoid-template-type-map.json. If there is no message at that location, or if the JSON is invalid, the inspector will not load. Alternatively, you may need to refresh your JavaScript cache.

Empty references appear
Empty references most commonly appear when the citation template being inserted contains no maps data, or if the maps data is there but not making it to the MediaWiki API. If the maps object is present in TemplateData, but not in the API response, try making a "null edit" on the template. If the response from the API looks okay, there may be an issue with the map itself.

My favourite site isn't recognised by citoid and only gets basic information

 * Main: Citoid/Determining if a URL has a translator in Zotero

The citoid service relies on the brilliant Zotero community for much of the "magic". We use Zotero translators to convert a page link into detailed information. These Zotero translators need to be written for each site. You can see a list of all Zotero translators at https://github.com/zotero/translators Right now, Zotero mostly supports English-language sources. We need your help to improve coverage of other sites. You can write your own Zotero translator. Start by looking at an existing translator for a similar website and by reading the general development framework instructions at https://www.zotero.org/support/dev/translators/framework.