mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-15 03:16:30 +01:00
6b03c711ac
* feat(shortcode): add link shortcode * docs: add docs for link shortcode * docs: fix 'mailto' in link shortcode docs error
9 lines
No EOL
440 B
HTML
9 lines
No EOL
440 B
HTML
{{- $rel := "" -}}
|
|
<a href="{{ .href | safeURL }}"{{ with .title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .href "http" }}{{ $rel = "noopener noreffer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .rel }} {{ . }}{{ end }}"{{ with .class }} class="{{ . }}"{{ end }}>
|
|
{{- with .icon -}}
|
|
{{- partial "plugin/icon.html" . -}}
|
|
{{- end -}}
|
|
{{- with .content -}}
|
|
{{- . | safeHTML -}}
|
|
{{- end -}}
|
|
</a> |