mirror of
https://github.com/rottenwheel/revuoxmrtheme.git
synced 2024-12-27 19:07:49 +00:00
feat: add custom link renderer for improved URL handling
Introduced a custom link renderer in the default layout to create links with enhanced URL safety and behavior. Links now open in a new tab if they start with "http", and include a title attribute if provided. This ensures better user experience and security.
This commit is contained in:
parent
f6db3448bd
commit
26f0a266ec
1 changed files with 1 additions and 0 deletions
1
layouts/_default/_markup/render-link.html
Normal file
1
layouts/_default/_markup/render-link.html
Normal file
|
@ -0,0 +1 @@
|
|||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text | safeHTML }}</a>
|
Loading…
Reference in a new issue