Help:Contributing/links: Difference between revisions
Fix the same-page section-link example (restore the #See also anchor case) (via update-page on MediaWiki MCP Server) |
Document the four bracketed per-section controls + the append editor (Preview, auto-summary); PR #124 (via update-page on MediaWiki MCP Server) |
||
| Line 71: | Line 71: | ||
</blockquote> | </blockquote> | ||
Every heading also carries | Every heading also carries four controls next to its <code>[edit]</code> link, each in its own pair of brackets — just like <code>[edit]</code>: | ||
* <code>[Copy internal mention]</code> copies <code>[[Page title#section|</code> (without the closing brackets — type your own display text after the final pipe); | |||
* <code>[Copy URL]</code> copies the section's absolute web address; | |||
* <code>[Add section below]</code> opens the editor targeting that section, inserting your content at its end; | |||
* <code>[Delete section]</code> opens a confirmation page that shows the section, then removes the whole section (heading and any subsections) when you confirm. | |||
The editor behind <code>Add section</code> (the page action) and <code>[Add section below]</code> works like [[Special:EditPage|Edit]] — the same wikitext toolbar and a '''Preview''' button — but it ''appends'' your content instead of replacing the page. Leave the '''Summary''' blank and it is filled in from the first heading of your content (the section-edit convention: a <code>== Vandermonde ==</code> heading gives <code>/* Vandermonde */</code>). | |||
== External links == | == External links == | ||
Revision as of 19:39, 14 October 2026
Links connect the pages of this wiki to each other and to the outside world. This page covers the link syntax you will use day to day: internal links, links to sections, external links and interwiki shortcuts.
Internal links
A wikilink points to another page on this wiki. Write the page title inside double square brackets.
| What you want | What you type | What you get |
|---|---|---|
| Link to a page | [[Main Page]]
|
Main Page |
| Link with your own label — the part after the pipe is shown | [[Help:Contributing|the contributor hub]]
|
the contributor hub |
| Link to an item — entity pages are ordinary pages here | [[Item:Q162|Blue Marble (photograph)]]
|
Blue Marble (photograph) |
| Link to a property | [[Property:P1|instance of]]
|
instance of |
| Link to a page that does not exist — a red link | [[My new page]]
|
My new page |
Following a red link opens the editor for that page: a red link is an invitation to create the page.
The first letter of the target is not case-sensitive —
[[main Page]]and[[Main Page]]are the same link. Every later letter must match the page title exactly:[[Item:q162]]is a red link, not the item. Spaces in a title are interchangeable with underscores.
Linking to the page you are editing renders as bold text, not as a link.
Prefer an internal link whenever the target lives on this wiki. A red link invites someone to create the page; an external link to the same page does not.
A piped link with an empty label shows an abbreviated title — the namespace is dropped: [[Item:Q162|]] shows Q162.
To make one title an alias of another, put #REDIRECT [[Main Page]] as the first line of the page — it then redirects to the target. See Help:Redirects (official).
Links to sections
Every heading is an automatic anchor, so a link can point straight at a section.
| What you want | What you type | What you get |
|---|---|---|
| A section on another page | [[Help:Contributing/code#House rules|house rules]]
|
house rules |
| A section on the same page | [[#See also|jump to the end]]
|
jump to the end |
| The top of the page | [[#top|back to top]]
|
back to top |
The anchor is the heading text as written: if the heading is renamed, links to that section break.
Every heading also carries four controls next to its [edit] link, each in its own pair of brackets — just like [edit]:
[Copy internal mention]copies[[Page title#section|(without the closing brackets — type your own display text after the final pipe);[Copy URL]copies the section's absolute web address;[Add section below]opens the editor targeting that section, inserting your content at its end;[Delete section]opens a confirmation page that shows the section, then removes the whole section (heading and any subsections) when you confirm.
The editor behind Add section (the page action) and [Add section below] works like Edit — the same wikitext toolbar and a Preview button — but it appends your content instead of replacing the page. Leave the Summary blank and it is filled in from the first heading of your content (the section-edit convention: a == Vandermonde == heading gives /* Vandermonde */).
External links
External links point to other websites. The URL comes first, the label after, inside single square brackets.
| What you want | What you type | What you get |
|---|---|---|
| Labelled link | [https://www.mediawiki.org MediaWiki]
|
MediaWiki |
| Bare URL — linked automatically, no brackets needed | https://www.mediawiki.org
|
https://www.mediawiki.org |
| No label — numbered automatically | [https://www.mediawiki.org]
|
[1] |
The URL and its label must stay on one line: a line break inside the brackets breaks the link, and the
[shows up literally.
External links carry a small arrow icon to show they leave this wiki.
Interwiki links
Interwiki links are shortcuts to other wikis, written like internal links with a prefix. This wiki comes with the standard prefixes: wikipedia, wikidata, commons, mw, and more.
| What you want | What you type | What you get |
|---|---|---|
| A Wikipedia article | [[wikipedia:Sunflower|sunflower]]
|
sunflower |
| A Wikidata item | [[wikidata:Q42|Q42]]
|
Q42 |
| A MediaWiki help page | [[mw:Help:Links|MediaWiki help]]
|
MediaWiki help |
Remote pages always render blue — interwiki links do not check whether the target page exists on the other wiki. The full list of prefixes is on Special:Interwiki.
The language versions of this wiki's pages are linked with the
{{Languages}}bar, not interlanguage markup — see Languages and translation.
Files and categories
A leading colon makes a file or category link visible as text instead of performing its action.
| What you want | What you type | What you get |
|---|---|---|
| A text link to a file page | [[:File:Example.png|Example.png]]
|
Example.png |
| A text link to a category | [[:Category:HowItWorks]]
|
Category:HowItWorks |
Without the colon,
[[File:…]]embeds the file and[[Category:…]]is treated as a plain page under theCategorynamespace.
Embedding images and media is covered in Help:Contributing/richMediaContent.
Markdown syntax does not work with wikis
- Internal links is:
[[Page title]], not[text](url). - External links is
[https://example.com label], not[label](https://example.com).
See also
- Help:Links (MediaWiki official) — the complete link reference
- Help:Redirects (MediaWiki official)
- Help:Piped link (MediaWiki official)
- Code blocks and syntax highlighting
- Items and properties
- Help:Contributing — the contributor hub