Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog teasers don't parse out YouTube video embeds correctly, looks bad #115

Open
geerlingguy opened this issue May 30, 2020 · 4 comments
Open
Labels
bug Something isn't working

Comments

@geerlingguy
Copy link
Owner

See: https://www.jeffgeerling.com/blog

Screen Shot 2020-05-29 at 7 10 30 PM

@mglaman found this, so credit to him... if you look at the blog page and one of the entries has a YouTube embed, it's all garbled. It should either display the embed, or drop it, not display a bunch of random CSS!

@geerlingguy geerlingguy added the bug Something isn't working label Jun 2, 2020
@geerlingguy
Copy link
Owner Author

There's, unfortunately, not much to go on here:

Screen Shot 2020-06-10 at 9 25 03 AM

I guess I could figure out a way to get something like Smart Trim working? Then use it as the formatter for the summary on Teasers?

@mglaman
Copy link

mglaman commented Jun 10, 2020

@geerlingguy I haven't looked at your code – but is the CSS being inlined into the body for videos? That's all I could imagine for the weird output.

@geerlingguy
Copy link
Owner Author

@mglaman Yes, that's exactly what's happening. I grab the embed code from http://embedresponsively.com — which tosses it into <style> tags. I could maybe put HTML comments around that?

@mglaman
Copy link

mglaman commented Jun 12, 2020

Ah, so it is intended to be embedded as part of the blog content. I think the only workaround is to add that kind of CSS to your site's theme, or manually set the teaser to not include the video.

@geerlingguy geerlingguy changed the title Blog teasers don't parse out embeds correctly, looks bad Blog teasers don't parse out YouTube video embeds correctly, looks bad Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants