feat: add social link for RSS and some configs (#250)

This commit is contained in:
Dillon
2020-04-22 23:58:40 +08:00
committed by GitHub
parent f5fb31ec43
commit 07b669c826
18 changed files with 199 additions and 67 deletions

View File

@@ -1,5 +1,5 @@
{{- $rel := "" -}}
<a href="{{ .href }}"{{ with .title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .href "http" }}{{ $rel = "noopener noreffer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .rel }} {{ . }}{{ end }}"{{ with .class }} class="{{ . }}"{{ end }}>
<a href="{{ .href }}"{{ with .title }} title="{{ . }}"{{ end }}{{ if (urls.Parse .href).Host | or .newtab }}{{ $rel = "noopener noreffer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .rel }} {{ . }}{{ end }}"{{ with .class }} class="{{ . }}"{{ end }}>
{{- with .icon -}}
{{- partial "plugin/icon.html" . -}}
{{- end -}}