eueung / hugo-casper-two

Port of Casper 2.x to Hugo
MIT License
141 stars 116 forks source link

Youtube Videos not showing up #5

Open saifulmuhajir opened 6 years ago

saifulmuhajir commented 6 years ago

Using singleViewStyle = "casper" causing Youtube videos not showing up on single post view. On the other hand, putting "caspertwo" showing Youtube videos just fine.

shah commented 6 years ago

I've got the same issue @eueung -- any idea how we can fix this issue? Thanks!

rguske commented 6 years ago

@eueung I´d appreciate if you could share any thoughts. I´m facing the same issue. Thanks a lot.

softinio commented 6 years ago

I am having this issue too. As a workaround I have created my own shortcode for youtube in the meanwhile in case anyone wants to use:

I created this layout/shortcodes/yt.html:

  <iframe src="https://www.youtube.com/embed/{{ index .Params 0 }}?start={{ index .Params 1 }}"
  style="position: absolute; top: 0; left: 0; width: 560; height: 315;" allowfullscreen frameborder="0" title="YouTube Video"></iframe>

Which creates a new shortcode called yt so I use it like this:

{{< yt adfadadaa >}}
rguske commented 6 years ago

Awesome @softinio! I immediately tried it out and it works smoothly! Thanks a lot for this! FYI @eueung @shah @saifulmuhajir

timhere commented 6 years ago

I'm also having this issue. I've looked in devtools and the shortcode is working as the iframe is present in the markup.

I assume this is a styling issue.