mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 15:11:24 -04:00
fix: navbar url for multi-lang site (#193)
* fix: image URL in feature card * fix: use relLangURL of pageRef for navbar entries
This commit is contained in:
@ -10,6 +10,10 @@
|
||||
{{- $external := hasPrefix $link "http" -}}
|
||||
{{- $href := cond (strings.HasPrefix $link "/") ($link | relURL) $link -}}
|
||||
|
||||
{{- if hasPrefix $image "/" -}}
|
||||
{{- $image = relURL (strings.TrimPrefix "/" $image) -}}
|
||||
{{- end -}}
|
||||
|
||||
<a
|
||||
{{ with $link }}href="{{ $href }}" {{ with $external }} target="_blank" rel="noreferrer"{{ end }}{{ end }}
|
||||
{{ with $style }}style="{{ . | safeCSS }}"{{ end }}
|
||||
|
Reference in New Issue
Block a user