Blot

YouTube Embeds have a forced padding attribute?

Is there anyway to control this style attribute at the Template's package.json level... or do I just have to use Javascript to remove it (yuck)? (I think this div wrapper with the style attribute is coming from Blot's YouTube "smart embeds" not YouTube itself so I was hoping there I was to have some control over it.)

Asked 9 months ago Edit
5 replies

Not right now, I'm open to re-evaluating the youtube embed output code. However, I'll need to investigate – for now I'd suggest either copying and pasting the embed code yourself, or using CSS/JS to mitigate if needed

9 months ago Edit

I found the partial in the git source but can I overload that with my own video.html template?

9 months ago Edit

Not possible right now, I'm open to making it possible but I need to think carefully about how to implement.

I do like the idea of template partial views for video.html, image.html etc...

Or maybe it should be a setting?

9 months ago Edit

I think there's probably only a handful of us that want this type of control and you'd be well within your rights to say "this is not really the aim of Blot." If you did support it I think a documentation reference that "if you choose to do so you may override the default presentation of these in your template at your own risk" kinda thing.

I will say that I was excited to see the auto-detection of YouTube embeds and then when I saw how it was rendered I was like, oof - that completely breaks the design flow of my pages (with such a large gap underneath the video player.)

In terms of "prior art" I know Hugo has similar detection of YouTube videos and has a default "partial" template to generate the rendering of them so that's at least one other CMS that choose to go the "video.html" partial route.

9 months ago Edit

For now are you able to use CSS to override this, using !important and get your layout working with your CSS? It's not ideal but it should get you there

I like the partial template idea, it could be extended to other uses too

9 months ago Edit

Your reply