Template:doi/doc
| This is a documentation subpage for Template:Doi. It may contain usage information, categories and other content that is not part of the original template page. |
| Warning | This template is used on approximately 28,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: |
| Error creating thumbnail: | The link in this template goes to a redirect page instead of to the article that is the target of the redirect. This redirect link is intentional so that links using the template are distinguishable from links to the article 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 |doi= in Citation Style 1 and Citation Style 2 templates except that this template can be used to render multiple DOIs.
Usage
[edit source]This template accepts these parameters:
|idn=– a DOI identifier; the|idn=parameter name is not required but is recommended for clarity when the template has multiple DOIs|doi-broken-daten=– for use when the doi specified with|idn=does not link to the identified source; enumerators required for second and subsequent DOI identifiers|doi-accessn=– accepts a single valuefree; for use when the doi at|idn=is free-to-read; enumerators required for second and subsequent DOI identifiers; DOI identified sources are assumed to be paywall protected|link=– accepts a single valueno; for use when it is the 'doi:' prefix in the rendering should not be linked|plainlink=– accepts a single valueyes; suppresses the 'doi:' prefix in the rendering|leadout=– defines the conjunction between the last two identifiers in the rendered list; defaults to,
The basic form is:
{{doi|id=10.1016/j.coi.2004.08.001}}→ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
For multiple DOIs:
{{doi|10.1038/380707a0|10.1038/36382}}→ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
When the DOI is freely-accessible, tag it as free with |doi-access=free
{{doi|10.1080/00295450.2017.1384269|doi-access=free}}→ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
To unlink the prefix:
{{doi|id=10.1016/j.coi.2004.08.001|link=no}}→ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
To suppress the prefix:
{{doi|id=10.1016/j.coi.2004.08.001|plainlink=yes}}→ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
To use and between the last two identifiers in the rendered list:
{{doi|10.1038/380707a0|10.1038/36382|leadout=and}}→ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
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
[edit source]- Category:DOI inactive – maintenance category for subcategories named in the form
Category:DOI inactive as of May 2026– for{{doi}}templates marked with|doi-broken-daten=May 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|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
[edit source]- {{doi-inline}}
- {{hdl}}
- Wikipedia:Digital Object Identifier
- Wikipedia:ISBN
- Wikipedia:PMID
- Wikipedia:ISSN
- {{bibcode}}
- {{PII}}
- {{SSRN}}
This template produces a simple, standardized link to a digital object identifier (DOI).
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| DOI name | 1 | no description
| Unknown | required |
| id | id | no description | Unknown | optional |