Hi there. Simple question i hope.
I have a database YAML like these
link001:
server:
subdomain: fonts
domain: google
tld: com
folder: /specimen/Roboto
link002:
server: http://
subdomain:
domain: dafont
tld: com
folder:
link003:
server: ftp://
subdomain:
domain: upload
tld: com
folder:
And my HTML File:
{{ range .Site.Data.links_fonts}}
{{ if .server }}
{{ .Scratch.Add "server" .server }}
{{ else }}
{{ .Scratch.Add "server" "https://" }}
{{ end }}
{{ $server := .Scratch.Get "server" }}
<a href="{{ $server }}{{ .domain }}.{{ .tld }}/{{ .folder }}">{{.domain}}</a>
{{ end }}
[edit]
No Error. There was a Syntax mistake by me. But i can not GET my Scratch outside my IF-Statement.
How can i use Scratch outside my IF-Statement?
I fixed my first Mistake but now i have a new one 
{{ range .Site.Data.links_fonts}}
{{ if .server }}
{{ $.Scratch.Add "server" .server }}
{{ else }}
{{ $.Scratch.Add "server" "https://" }}
{{ end }}
{{ if .subdomain }}
{{ $.Scratch.Add "server" .subdomain }}
{{ end }}
{{ $.Scratch.Add "server" .domain }}
{{ $.Scratch.Add "server" "." }}
{{ $.Scratch.Add "server" .tld }}
{{ if .folder }}
{{ $.Scratch.Add "server" "/" }}
{{ $.Scratch.Add "server" .folder }}
{{ end }}
{{ $server := $.Scratch.Get "server" }}
<a href="{{ $server | urlize }}">{{if .subdomain}}{{.subdomain}}.{{end}}{{.domain}}.{{.tld}}</a>
{{ $.Scratch.Delete "server" }}
{{ end }}
i get weird URL’s. i tried | urlize | relURL | urlize
nothing helps 
any ideas to get just a normal output?
[edit]
| safeURL
is the way to go!
I’m sorry if i make any “trouble”. Writing the problem in this board is very meditative and I find the answer by itself
What did you do to fix it? You didn’t say.