Template:Citation Style documentation/url: Difference between revisions
m (1 revision imported) |
(copy edits for clarity since if an entire website is unsuitable it either should be usurped or blacklisted, not unfit - advertising and spam is redundant information - no need to high-lite porn when gambling sites are a much bigger problem on wikipedia eg. WP:JUDI) |
||
Line 3: | Line 3: | ||
** <b id="csdoc_archiveurl">archive-url</b>: The URL of an [[Web archiving|archived]] snapshot of a web page. Typically used to refer to services such as [[Internet Archive]] {{crossref|(see [[Wikipedia:Using the Wayback Machine]])}} and [[archive.today]] {{crossref|(see [[Help:Using archive.today]])}}; requires '''archive-date''' and '''url'''. By default (overridden by {{para|url-status|live}}) the archived link is displayed first, with the original link at the end. Alias: '''archiveurl'''. | ** <b id="csdoc_archiveurl">archive-url</b>: The URL of an [[Web archiving|archived]] snapshot of a web page. Typically used to refer to services such as [[Internet Archive]] {{crossref|(see [[Wikipedia:Using the Wayback Machine]])}} and [[archive.today]] {{crossref|(see [[Help:Using archive.today]])}}; requires '''archive-date''' and '''url'''. By default (overridden by {{para|url-status|live}}) the archived link is displayed first, with the original link at the end. Alias: '''archiveurl'''. | ||
*** <b id="csdoc_archivedate">archive-date</b>: Archive-service snapshot-date; preceded in display by default text "archived from the original on". Use the same format as other access and archive dates in the citations. This does not necessarily have to be the same format that was used for citing publication dates.{{r|date|group=date}} Do not wikilink; templated dates are discouraged. See [[#csdoc_auto-date-format|"Automatic date formatting"]] above for details about interaction with {{tlx|use dmy dates}} and {{tlx|use mdy dates}}. Alias: '''archivedate'''. | *** <b id="csdoc_archivedate">archive-date</b>: Archive-service snapshot-date; preceded in display by default text "archived from the original on". Use the same format as other access and archive dates in the citations. This does not necessarily have to be the same format that was used for citing publication dates.{{r|date|group=date}} Do not wikilink; templated dates are discouraged. See [[#csdoc_auto-date-format|"Automatic date formatting"]] above for details about interaction with {{tlx|use dmy dates}} and {{tlx|use mdy dates}}. Alias: '''archivedate'''. | ||
*** <b id="csdoc_urlstatus">url-status</b>: | *** <b id="csdoc_urlstatus">url-status</b>: A control parameter to select one of {{para|url}} or {{para|archive-url}} to link {{para|title}}; requires '''url''' {{em|and}} '''archive-url'''. Use {{tlx|dead link}} to mark dead {{para|url}} when there is no {{para|archive-url}}. | ||
*** <b id="csdoc_archive_format">archive-format</b>: File format of the work referred to by '''archive-url'''; for example: | ***:Accepts multiple keywords: | ||
***:*<code>dead</code> – (default condition when {{para|url-status}} omitted or empty) selects {{para|archive-url}} | |||
***:*<code>live</code> – selects {{para|url}}; used when {{para|url}} is preemptively archived with {{para|archive-url}} | |||
***:*<code>deviated</code> – selects {{para|archive-url}}; used when {{para|url}} is still 'live' but no-longer supports the text in a Wikipedia article | |||
***:*<code>unfit</code> – selects {{para|archive-url}}; used when {{para|url}} links to vice, advertising, or other unsuitable links; links to {{para|url}} are suppressed in the rendering. If an entire domain is unsuitable, consider instead [[WP:USURPURL|usurpation]] or [[WP:BLACKLIST|blacklist]]. Bot help is available at [[WP:URLREQ]] | |||
***:*<code>usurped</code> – selects {{para|archive-url}}; used when the domain in {{para|url}} no longer serves its original intent, particularly when the domain has been (mis)appropriated by other entities, such as vice, reseller and advertising sites; links to {{para|url}} are suppressed in the rendering. Bot help is available at [[WP:URLREQ]] | |||
*** <b id="csdoc_archive_format">archive-format</b>: File format of the work referred to by '''archive-url'''; for example: DOC or XLS; displayed in parentheses after the archive link. HTML is implied and should not be specified. PDF is auto-detected and should not be specified. Does not change the [[Help:External link icons|external link icon]] (except for PDF). Note: External link icons do not include [[Wikipedia:ALT|alt text]]; thus, they do not add file format information for the visually impaired. (This is not a concern with PDF, because the auto-detection will add "(PDF)" as descriptive text.) {{crossref|See [[Help:Citation Style 1#Using {{pipe}}format=|Using {{pipe}}format=]]}} | |||
** <b id="csdoc_url_access">url-access</b>: {{crossref|See [[#Access indicators for url-holding parameters|Access indicators for url-holding parameters]]}} | ** <b id="csdoc_url_access">url-access</b>: {{crossref|See [[#Access indicators for url-holding parameters|Access indicators for url-holding parameters]]}} | ||
* <b id="csdoc_format">format</b>: File format of the work referred to by '''url'''; for example: | * <b id="csdoc_format">format</b>: File format of the work referred to by '''url'''; for example: DOC or XLS; displayed in parentheses after '''title'''. (For media format, use '''type'''.) HTML is implied and should not be specified. PDF is auto-detected and should not be specified. Does not change the [[Help:External link icons|external link icon]] (except for PDF). Note: External link icons do not include [[Wikipedia:ALT|alt text]]; thus, they do not add file format information for the visually impaired. (This is not a concern with PDF, because the auto-detection will add "(PDF)" as descriptive text.) {{crossref|See [[Help:Citation Style 1#Using {{pipe}}format=|Using {{pipe}}format=]]}} | ||
{{MediaWiki URL rules}} | {{MediaWiki URL rules}} | ||
{{reflist|group=date|refs=<ref name=date>Access-date and archive-date in references should all have the same format – either the format used for publication dates, or YYYY-MM-DD. {{crossref|See [[MOS:DATEUNIFY]].}}</ref>}} | {{reflist|group=date|refs=<ref name=date>Access-date and archive-date in references should all have the same format – either the format used for publication dates, or YYYY-MM-DD. {{crossref|See [[MOS:DATEUNIFY]].}}</ref>}} |
Revision as of 03:13, 8 October 2023
- url: URL of an online location where the text of the publication named by title can be found. Cannot be used if title is wikilinked. If applicable, the link may point to the specific page(s) referenced. Remove tracking parameters from URLs, e.g.
#ixzz2rBr3aO94
or?utm_source=google&utm_medium=...&utm_term=...&utm_campaign=...
. Do not link to any commercial booksellers, such as Amazon; use|isbn=
or|oclc=
to provide neutral search links for books. Invalid URLs, including those containing spaces, will result in an error message.- access-date: Full date when the content pointed to by url was last verified to support the text in the article; do not wikilink; requires url; use the same format as other access and archive dates in the citations.[date 1] Not required for linked documents that do not change. For example, access-date is required for online sources, such as personal websites, that do not have a publication date; see WP:CITEWEB. Access dates are not required for links to published research papers or published books. Note that access-date is the date that the URL was found to be working and to support the text being cited. See "Automatic date formatting" above for details about interaction with
{{use dmy dates}}
and{{use mdy dates}}
. Can be hidden or styled by registered editors. Alias: accessdate. - archive-url: The URL of an archived snapshot of a web page. Typically used to refer to services such as Internet Archive and archive.today ; requires archive-date and url. By default (overridden by
|url-status=live
) the archived link is displayed first, with the original link at the end. Alias: archiveurl.- archive-date: Archive-service snapshot-date; preceded in display by default text "archived from the original on". Use the same format as other access and archive dates in the citations. This does not necessarily have to be the same format that was used for citing publication dates.[date 1] Do not wikilink; templated dates are discouraged. See "Automatic date formatting" above for details about interaction with
{{use dmy dates}}
and{{use mdy dates}}
. Alias: archivedate. - url-status: A control parameter to select one of
|url=
or|archive-url=
to link|title=
; requires url and archive-url. Use{{dead link}}
to mark dead|url=
when there is no|archive-url=
.- Accepts multiple keywords:
dead
– (default condition when|url-status=
omitted or empty) selects|archive-url=
live
– selects|url=
; used when|url=
is preemptively archived with|archive-url=
deviated
– selects|archive-url=
; used when|url=
is still 'live' but no-longer supports the text in a Wikipedia articleunfit
– selects|archive-url=
; used when|url=
links to vice, advertising, or other unsuitable links; links to|url=
are suppressed in the rendering. If an entire domain is unsuitable, consider instead usurpation or blacklist. Bot help is available at WP:URLREQusurped
– selects|archive-url=
; used when the domain in|url=
no longer serves its original intent, particularly when the domain has been (mis)appropriated by other entities, such as vice, reseller and advertising sites; links to|url=
are suppressed in the rendering. Bot help is available at WP:URLREQ
- Accepts multiple keywords:
- archive-format: File format of the work referred to by archive-url; for example: DOC or XLS; displayed in parentheses after the archive link. HTML is implied and should not be specified. PDF is auto-detected and should not be specified. Does not change the external link icon (except for PDF). Note: External link icons do not include alt text; thus, they do not add file format information for the visually impaired. (This is not a concern with PDF, because the auto-detection will add "(PDF)" as descriptive text.)
- archive-date: Archive-service snapshot-date; preceded in display by default text "archived from the original on". Use the same format as other access and archive dates in the citations. This does not necessarily have to be the same format that was used for citing publication dates.[date 1] Do not wikilink; templated dates are discouraged. See "Automatic date formatting" above for details about interaction with
- url-access:
- access-date: Full date when the content pointed to by url was last verified to support the text in the article; do not wikilink; requires url; use the same format as other access and archive dates in the citations.[date 1] Not required for linked documents that do not change. For example, access-date is required for online sources, such as personal websites, that do not have a publication date; see WP:CITEWEB. Access dates are not required for links to published research papers or published books. Note that access-date is the date that the URL was found to be working and to support the text being cited. See "Automatic date formatting" above for details about interaction with
- format: File format of the work referred to by url; for example: DOC or XLS; displayed in parentheses after title. (For media format, use type.) HTML is implied and should not be specified. PDF is auto-detected and should not be specified. Does not change the external link icon (except for PDF). Note: External link icons do not include alt text; thus, they do not add file format information for the visually impaired. (This is not a concern with PDF, because the auto-detection will add "(PDF)" as descriptive text.)
URLs must begin with a supported URI scheme. http://
and https://
will be supported by all browsers; however, ftp://
, gopher://
, irc://
, ircs://
, mailto:
and news:
may require a plug-in or an external application and should normally be avoided. IPv6 host-names are currently not supported.
If URLs in citation template parameters contain certain characters, then they will not display and link correctly. Those characters need to be percent-encoded. For example, a space must be replaced by %20
. To encode the URL, replace the following characters with:
Character | space | " | ' | < | > | [ | ] | { | | | } |
---|---|---|---|---|---|---|---|---|---|---|
Encoding | %20 | %22 | %27 | %3C | %3E | %5B | %5D | %7B | %7C | %7D |
Single apostrophes do not need to be encoded; however, unencoded multiples will be parsed as italic or bold markup. Single curly closing braces also do not need to be encoded; however, an unencoded pair will be parsed as the double closing braces for the template transclusion.