feat(links): add an option for external link decoration (#780)

* chore: add icons

* feat: add option to flag outbound links

* chore: generate

* docs: add configuration

* chore: use with the example site

* chore: use one icon with rotation
This commit is contained in:
Ludovic Fernandez
2025-08-24 13:57:07 +02:00
committed by GitHub
parent f297d24189
commit a19de798b6
6 changed files with 34 additions and 3 deletions

View File

@@ -442,3 +442,12 @@ The field `message` supports Markdown syntax.
If you want to use template syntax, you can define the partial in `layouts/_partials/custom/banner.html`.
In this case, the field `message` will be ignored.
### External Link Decoration
Adds an arrow icon to external links (default: false) when rendering links from Markdown.
```yaml
params:
externalLinkDecoration: true
```

View File

@@ -121,6 +121,8 @@ menu:
params:
description: Modern, responsive, batteries-included Hugo theme for creating beautiful static websites.
externalLinkDecoration: true
banner:
key: 'announcement-v0_10'

View File

@@ -159,6 +159,7 @@
"hx:active:shadow-gray-200",
"hx:active:shadow-sm",
"hx:align-[-2.5px]",
"hx:align-baseline",
"hx:align-middle",
"hx:align-text-bottom",
"hx:appearance-none",
@@ -602,6 +603,7 @@
"hx:rtl:pr-5",
"hx:rtl:pr-6",
"hx:rtl:pr-8",
"hx:rtl:rotate-270",
"hx:rtl:text-left",
"hx:scroll-my-6",
"hx:scroll-py-6",