link

i18n-aware link with auto external-detection — drop-in alternative to a markdown link when you need language-prefix resolution.

≈ 2 min read 222 words Updated 2026-08-23

On this page

The link shortcode is an i18n-aware link renderer with automatic external-detection. Use it inside markdown when you want a link that resolves to the current language prefix automatically — particularly useful for footer rows and cross-section navigation.

Source: themes/bifrost/templates/shortcodes/link.html

Syntax#

{{ link(url="wiki/elohim/", text="Elohim") }}
{{ link(url="https://example.com", text="External", title="External resource") }}
ParamTypeRequiredDefaultWhat
urlstringyesInternal path or absolute URL.
textstringyesLink label.
titlestringno""Optional title attribute.
classstringno""Optional CSS class(es).
targetstringno""Override the auto-detected target.

External detection#

URLs that start with http:// or https:// and don’t contain config.base_url are flagged external — adds target="_blank", rel="noopener noreferrer", and a indicator after the link text.

i18n behaviour#

When the current page is non-default-language and the link is internal:

  • relative paths (no leading /) get a /<lang>/ prefix
  • absolute paths get a /<lang> prefix unless already language-prefixed

The default language never gets a prefix (canonical paths stay clean on English pages).

When to use this vs wiki#

Linking to…Use
A wiki entrywiki — gets .wikilink styling + tooltip integration.
A specific Library book quotelibrary — paired-tag with deep-link + CTA.
Anywhere else (internal or external)link — generic.
Plain markdown when you don’t care about i18nA markdown link [text](url).

Edit this page on GitHub