link

Two link-render macros: `smart_link` (auto-detects external) and `footer_link` (internal i18n).

Updated 2026-08-23

On this page

macros/link.html exposes two link-render helpers that handle external- vs-internal detection and i18n consistently across the site.

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

Renders a link with an external-indicator arrow () appended when the URL is off-site.

{%/* import "macros/link.html" as link */%}

{{ link::smart_link(
    url="https://example.com",
    text="External resource",
    title="…",
    class="…",
    target=""
) }}

External detection: URLs that start with http:// or https:// and don’t contain beta.wheelofheaven. are flagged external — adds target="_blank", rel="noopener noreferrer", and the indicator arrow.

For footer rows. Resolves internal paths against the current language prefix so a link to wiki/ becomes /de/wiki/ on German pages.

{{ link::footer_link(
    url="wiki/",
    text=trans(key="navbarWiki", lang=detected_lang),
    title="",
    class="footer-link"
) }}
ParamTypeDefaultWhat
urlstringInternal path or absolute URL.
textstringLink label.
titlestring""Optional title attribute.
classstring""Optional CSS class(es).
targetstring""Override the auto-detected target.

Edit this page on GitHub