Files
FixIt/apps/test/content/posts/link-test.md
T
Cell 01eadc4356 refactor: extract console banner to core/banner.ts
- Create core/banner.ts for styled console version message
- Replace example.com with real domains in link test content
- Update type definitions and core module
2026-06-17 18:05:25 +08:00

3.1 KiB

title, date, collections, categories, tags, link_guard
title date collections categories tags link_guard
Link Rendering Test 2026-04-10T11:40:06+08:00
Tests
Markdown
Link
enable allow_domains
true
demo.fixit.lruihao.cn

This post validates link rendering paths in FixIt, including Markdown render hook and link shortcode modes.

These links are rendered by layouts/_markup/render-link.html and should always produce regular links.

Title Attribute (Markdown)

External link with title

Named parameters

{{< link href="https://github.com/hugo-fixit/FixIt" content="GitHub via shortcode" title="GitHub title" >}}

{{< link href="/test/units/codeblock-test/" content="Internal shortcode link" class="shortcode-link-test" >}}

{{< link href="https://google.com" content="Custom rel + no noreferrer" rel="ugc" noreferrer=false >}}

{{< link href="/images/fixit.svg" content="Download local file" download="fixit.svg" >}}

Positional parameters

{{< link "https://mozilla.org" "Positional regular link" "Positional title" >}}

Basic card

{{< link href="https://fixit.lruihao.cn" content="FixIt Documentation" card=true >}}

Card with custom icon class

{{< link href="https://github.com/hugo-fixit/FixIt" content="FixIt on GitHub" card=true card-icon="fa-brands fa-github" >}}

Card with custom image icon

{{< link href="https://gohugo.io" content="Hugo Official Site" card=true card-icon="/images/hugo.svg" >}}

Card with download state

{{< link href="/images/fixit.svg" content="Download as card" card=true download="fixit.svg" >}}

Positional card parameters

{{< link "https://google.com" "Positional card link" "" true "fa-solid fa-link" >}}

Edge Cases

Manual Verification Checklist

  • Regular Markdown external links include external behavior and icon policy.
  • Internal links are not treated as external.
  • Shortcode card links render .card-link structure and card meta URL.
  • download shows download icon/state in both regular and card modes.
  • noreferrer=false removes noopener noreferrer from generated rel values.