chore(partials): refactor partials
This commit is contained in:
9
layouts/partials/plugin/link.html
Normal file
9
layouts/partials/plugin/link.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{{- $href := index . "href" -}}
|
||||
<a href="{{ $href | safeURL }}"{{ with index . "title" }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix $href "http" }} target="_blank"{{ end }} rel="noopener noreffer{{ with index . `rel` }} {{ . }}{{ end }}">
|
||||
{{- with index . "icon" -}}
|
||||
{{- partial "plugin/icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- with index . "content" -}}
|
||||
{{- . | safeHTML -}}
|
||||
{{- end -}}
|
||||
</a>
|
||||
Reference in New Issue
Block a user