Using Links
Links are written with bracket syntax: square brackets around the target, with an optional display text in front of a | pipe. This one form covers page links, section links, external sites, email addresses, and InterWiki shortcuts — the link type is detected from the target. See Page Content for the rest of the page body syntax.
Quick Reference
[Page Name] a page
[Display Text|Page Name] a page, your own wording
[Display Text|Page Name#heading-slug] a section of another page
[Display Text|Page Name#section=Heading Name] the same, slug worked out for you
[Display Text|#heading-slug] a section of this page
[Display Text|https://example.com] an external site
[Display Text|mailto:[email protected]] an email address
[Display Text|Wikipedia:Article_Name] another site by shortcut
[Display Text|Page Name|class='btn btn-sm'] a link with HTML attributes
Page Links
Link to another page by putting its title in brackets:
[Page Content]
Add a | to control the wording shown to the reader. The part before the pipe is what readers see; the part after is the target:
[read more about page bodies|Page Content]
As you type inside [, an autocomplete dropdown suggests matching page titles.
Use the title, not the slug
The target is the page title — Building Blocks of Life — not its URL slug (building-blocks-of-life). Spaces are fine and are encoded for you.
Red links
If no page matches the target, the link renders in red and points at the editor instead of the page. Clicking it starts a new page with that title. A red link is normal for a page you plan to write; it is also the first symptom of a typo in the target.
Near-miss matching
Targets do not have to match the title exactly. Case differences are tolerated, and — when enabled — so are English plurals, so [Elements] can find a page titled Element. Plural matching is controlled by ngdpbase.translator-reader.match-english-plurals and CamelCase matching by ngdpbase.translator-reader.camel-case-links; see Configuration Properties Reference.
Section Links
Every heading on a rendered page automatically gets an id, so any heading can be linked to directly. The reader jumps straight to that heading instead of the top of the page.
How a heading becomes a slug
The id is derived from the heading text:
- Lowercase it.
- Remove anything that is not a letter, digit, space, or hyphen.
- Replace runs of spaces with a single hyphen.
- Trim leading and trailing hyphens.
| Heading | Slug |
|---|---|
## The Elemental Ingredients | the-elemental-ingredients |
## PLA (Polylactic Acid) | pla-polylactic-acid |
## 3D Printing Filaments | 3d-printing-filaments |
Linking to a section of another page
Append # and the slug to the page title:
[The Elemental Ingredients|Building Blocks of Life#the-elemental-ingredients]
Letting the slug be worked out for you
If you would rather write the heading as it appears, use the #section= form. The heading text is converted to a slug using the rules above:
[The Elemental Ingredients|Building Blocks of Life#section=The Elemental Ingredients]
Both forms produce the same link. Use #section= when the heading has punctuation or mixed case you would rather not translate by hand.
Linking within the current page
Leave the page title off and start with #:
[Jump to the ingredients|#the-elemental-ingredients]
[Jump to the ingredients|#section=The Elemental Ingredients]
This is how you build a hand-written table of contents at the top of a long page.
If the jump does not work
The slug must match a heading that actually exists on the target page. Open the target page and check its headings — a link to #the-elements does nothing if the heading is really ## The Elemental Ingredients. Headings are re-slugged whenever they are edited, so renaming a heading breaks every link pointing at its old slug.
External Links
A target starting with http:// or https:// is treated as an external link. It opens in a new tab and carries rel="noopener noreferrer":
[Example site|https://example.com]
A bare URL in the target position works too:
[https://example.com]
Absolute paths
A target starting with / is also treated as external, which means it opens in a new tab:
[Media library|/media]
To link to a page on this site in the same tab, use the page title instead — [Media] — rather than an absolute /view/… path.
Email Links
A target starting with mailto: becomes an email link:
[Contact the editor|mailto:[email protected]]
InterWiki Links
A target of the form SiteName:Article expands to a full URL using the configured shortcut list:
[Apache HTTP Server|Wikipedia:Apache_HTTP_Server]
Unknown site names fall back to a red link. See InterWikiLinks for the configured shortcuts and how to add more.
Link Attributes
A third pipe segment adds HTML attributes to the link. Attributes are whitelisted — class, id, title, target, rel, style, and a few others — and a custom class extends the link's built-in classes rather than replacing them:
[← Previous|2026-trip-west-day-04|class='btn btn-outline-primary btn-sm']
[Open in a new tab|https://example.com|target="_blank"]
[Hover hint|Page Content|title='More about page bodies']
The first example renders the link as a button — put several on one line for a button row.
Markdown Link Syntax
Standard Markdown links also work and are passed through untouched:
[Example site](https://example.com)
[The ingredients](/view/Building%20Blocks%20of%20Life#the-elemental-ingredients)
Bracket syntax is preferred for links to pages on this site: it checks whether the page exists, shows red links for the ones that don't, and survives a page being renamed better than a hand-written path.
Troubleshooting
| Symptom | Likely cause |
|---|---|
| Link is red | No page matches the target. Check spelling and use the page __title__, not the slug. |
| Link works but doesn't jump to the section | The slug doesn't match any heading on the target page. Open the target and compare its headings. |
| Link opened in a new tab unexpectedly | The target started with / or http, so it was treated as external. Use the page title instead. |
| Brackets rendered as literal text | The link is inside a code block or fenced block, where syntax is not processed. |
See Also
- Page Content — the rest of the page body syntax
- InterWikiLinks — shortcuts to other sites
- Markdown Cheat Sheet — general Markdown reference
- Using InsertPlugin — embedding a section of another page instead of linking to it
No comments yet.