Remove whitespace around urls wherever applicable

- corrects mistyped urls with leading or trailing whitespaces
This commit is contained in:
Aditya Telange 2020-12-13 16:56:41 +05:30
parent 8af7c551ff
commit 14c524539b
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
3 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@
{{- with .buttons }}
<div class="buttons">
{{- range . -}}
<a class="button" href="{{ .url }}" rel="noopener" title="{{ .name | humanize }}">
<a class="button" href="{{ trim .url " " }}" rel="noopener" title="{{ .name | humanize }}">
<span class="button-inner">{{ .name }}</span>
</a>
{{- end -}}

View File

@ -1,6 +1,6 @@
<div class="social-icons">
{{- range . -}}
<a href="{{ .url }}" target="_blank" rel="noopener noreferrer me"
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me"
title="{{ .name | humanize }}">{{ partial "svg.html" . }}</a>
{{- end -}}
</div>

View File

@ -9,9 +9,9 @@
"thumbnailUrl": {{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }},
"sameAs": [
{{- if .Site.Params.schema.sameAs }}
{{ range $i, $e := .Site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}
{{ range $i, $e := .Site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ trim $e " " }}{{ end }}
{{- else}}
{{ range $i, $e := .Site.Params.SocialIcons }}{{ if $i }}, {{ end }}{{ $e.url }}{{ end }}
{{ range $i, $e := .Site.Params.SocialIcons }}{{ if $i }}, {{ end }}{{ trim $e.url " " }}{{ end }}
{{- end}}
]
}