Change the default behavior of the HomepageFeaturedItem component so that, in the case of a video, when no child item is provided, the default behavior is that the thumbnail is grabbed and used from youtube using the video ID.
For example, authoring a HomepageFeaturedItem like this:
<HomepageFeaturedItem lesson="visual-proofs" caption="Latest video: How to Lie with Visual Proofs">
</HomepageFeaturedItem>
Would result in behavior like what is shown below. Note, this is currently what I have hardcoded into the site for this lesson in the content/index.mdx file.
<HomepageFeaturedItem lesson="visual-proofs" caption="Latest video: How to Lie with Visual Proofs">
<img src="https://img.youtube.com/vi/VYQVlVoWoPY/maxresdefault.jpg" />
</HomepageFeaturedItem>
There also could be a reusable component like YoutubeThumbnail or something similar to be explicit about intent instead of default behavior when left blank.
<HomepageFeaturedItem lesson="visual-proofs" caption="Latest video: How to Lie with Visual Proofs">
<YoutubeThumbnail lesson="visual-proofs"/>
</HomepageFeaturedItem>
Change the default behavior of the HomepageFeaturedItem component so that, in the case of a video, when no child item is provided, the default behavior is that the thumbnail is grabbed and used from youtube using the video ID.
For example, authoring a HomepageFeaturedItem like this:
Would result in behavior like what is shown below. Note, this is currently what I have hardcoded into the site for this lesson in the
content/index.mdx
file.There also could be a reusable component like YoutubeThumbnail or something similar to be explicit about intent instead of default behavior when left blank.