fix: wrong URL of JS and CSS files on baseURL (#249)

This commit is contained in:
Dillon
2020-04-22 21:34:38 +08:00
committed by GitHub
parent 3c38d54a87
commit f5fb31ec43
11 changed files with 33 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
{{- $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 }}>
<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 }}>
{{- with .icon -}}
{{- partial "plugin/icon.html" . -}}
{{- end -}}