Youtube embed not appearing on blog homepage

Hi,

If I embed a YouTube video, it appears fine within the post itself but not on the list view homepage of all posts for that blog.

I think my theme is stripping out any video that appears in either .Summary or .Truncated, but I’m not sure how to check this.

Summary and Truncated do not include complex HTML. That’s true of Hugo, and not in your or Micro.blog’s control.

Yeah, as @jsonbecker has already pointed out, that’s by design when it comes to automatic summary splitting. HTML tags are kept if you do the split manually, though, using the <!--more--> summary divider. So, posting like this should keep the video in the home page’s list view:

{{< youtube P2KnD7sfpoA >}}

🤘🥹

<!--more-->

The rest of a long post. Hodor. Hodor hodor, hodor. Hodor hodor hodor hodor hodor. Hodor. Hodor! Hodor hodor, hodor; hodor hodor hodor. Hodor. Hodor hodor; hodor hodor - hodor, hodor, hodor hodor. Hodor, hodor. Hodor. Hodor, hodor hodor hodor; hodor hodor; hodor hodor hodor! Hodor hodor HODOR! Hodor hodor... Hodor hodor hodor...

It should be noted the micro.blog timeline strips embeds so that post will work on your site, but have the missing video there. That’s true regardless of truncation.

1 Like

Got it, thank you.