| This template is used on approximately 29,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
| This template uses Lua: |
| The wikilink produced by this template goes to a dedicated redirect page, NOT directly to the displayed article name. This indirection was established to keep the wikilinks produced by this template separate from intentional links to the article.
Wikilinks produced by this template go to Doi (identifier) and are listed at Special:WhatLinksHere/Doi (identifier). Wikilinks added by editors go to Digital object identifier and are listed on the Special:WhatLinksHere/Digital object identifier page. |
This template produces a simple, standardized link to a source from the source's digital object identifier (DOI). The DOI is rendered using much of the same code that renders <syntaxhighlight lang="wikitext" inline style="display: none;" />|doi= in Citation Style 1 and Citation Style 2 templates except that this template can be used to render multiple DOIs.
Usage
This template accepts these parameters:
- <syntaxhighlight lang="wikitext" inline style="display: none;" />
|idn=– a DOI identifier; the <syntaxhighlight lang="wikitext" inline style="display: none;" />|idn=parameter name is not required but is recommended for clarity when the template has multiple DOIs - <syntaxhighlight lang="wikitext" inline style="display: none;" />
|doi-broken-daten=– for use when the doi specified with <syntaxhighlight lang="wikitext" inline style="display: none;" />|idn=does not link to the identified source; enumerators required for second and subsequent DOI identifiers - <syntaxhighlight lang="wikitext" inline style="display: none;" />
|doi-accessn=– accepts a single valuefree; for use when the doi at <syntaxhighlight lang="wikitext" inline style="display: none;" />|idn=is free-to-read; enumerators required for second and subsequent DOI identifiers; DOI identified sources are assumed to be paywall protected - <syntaxhighlight lang="wikitext" inline style="display: none;" />
|link=– accepts a single valueno; for use when it is the 'doi:' prefix in the rendering should not be linked - <syntaxhighlight lang="wikitext" inline style="display: none;" />
|plainlink=– accepts a single valueyes; suppresses the 'doi:' prefix in the rendering - <syntaxhighlight lang="wikitext" inline style="display: none;" />
|leadout=– defines the conjunction between the last two identifiers in the rendered list; defaults to,
The basic form is:
- <syntaxhighlight lang="wikitext" inline="1">doi:10.1016/j.coi.2004.08.001</syntaxhighlight> → doi:10.1016/j.coi.2004.08.001
For multiple DOIs:
- <syntaxhighlight lang="wikitext" inline="1">doi:10.1038/380707a0, 10.1038/36382</syntaxhighlight> → doi:10.1038/380707a0, 10.1038/36382
When the DOI is freely-accessible, tag it as free with <syntaxhighlight lang="wikitext" inline style="display: none;" />|doi-access=free
- <syntaxhighlight lang="wikitext" inline="1">doi:10.1080/00295450.2017.1384269</syntaxhighlight> → doi:10.1080/00295450.2017.1384269
To unlink the prefix:
- <syntaxhighlight lang="wikitext" inline="1">doi:10.1016/j.coi.2004.08.001</syntaxhighlight> → doi:10.1016/j.coi.2004.08.001
To suppress the prefix:
- <syntaxhighlight lang="wikitext" inline="1">10.1016/j.coi.2004.08.001</syntaxhighlight> → 10.1016/j.coi.2004.08.001
To use and between the last two identifiers in the rendered list:
- <syntaxhighlight lang="wikitext" inline="1">doi:10.1038/380707a0 and 10.1038/36382</syntaxhighlight> → doi:10.1038/380707a0 and 10.1038/36382
When this template emits an error message for a valid (working) DOI, use the accept-as-written markup ((..)) to suppress the error message.
For instructions on how to use Wikipedia to automatically expand a DOI into a full reference complete with article title, author(s), date, journal name, volume, issue, page numbers, etc., please see User:Citation bot/use.
Tracking categories
- Category:DOI inactive – maintenance category for subcategories named in the form
Category:DOI inactive as of October 2026– for{{doi}}templates marked with <syntaxhighlight lang="wikitext" inline style="display: none;" />|doi-broken-daten=October 2026 - Category:Ignored DOI errors – maintenance category for
{{doi}}templates using the accept-as-written markup((..))to suppress an error message - Category:Unflagged free DOI – maintenance category for
{{doi}}templates that should be marked with <syntaxhighlight lang="wikitext" inline style="display: none;" />|doi-accessn=free - Category:Pages with DOI errors – error category for
{{doi}}templates that show an error message
Because this template uses the same code as cs1|2 templates, error and maintenance visibility is controlled the same way. See Help:CS1 errors § Controlling error message display.
See also
- {{doi-inline}}
- {{hdl}}
- Wikipedia:Digital Object Identifier
- Wikipedia:ISBN
- Wikipedia:ISSN
- Wikipedia:PMID
- {{bibcode}}
- {{SSRN}}
<templatedata> { "params": { "1": { "label": "DOI name", "example": "10.1000/xyz123", "required": true }, "id": {} }, "description": "This template produces a simple, standardized link to a digital object identifier (DOI).", "paramOrder": [ "1", "id" ] } </templatedata>