{{- $youtubeHost := "https://www.youtube.com/watch?v=" }} {{- $url := .Get 0 }} {{- if in $url $youtubeHost }} {{- $url = strings.TrimPrefix $youtubeHost $url }} {{- end }}