Probably a simple syntax thing but I can’t figure it out. To loop an embedded youtube video, I need to add &playlist=id. How do access $id again?
Current code (just scroll all the way to the right):
src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1&mute=1{{ end }}{{ end }}{{ with .Get "controls" }}{{ if eq . "false" }}&controls=0{{ end }}{{ end }}{{ with .Get "loop" }}{{ if eq . "true" }}&loop=1&playlist={{ $id }}{{ end }}{{ end }}"
This yields the error:
Rebuild failed: “C:\Users\Kevin\Documents\kevinlinxc.github.io\content\video_editing\index.md:49:1”: failed to render shortcode “youtube”: failed to process shortcode: execute of template failed: html/template:shortcodes/youtube.html:12:274: {{$id}} appears in an ambiguous context within a URL