Huan Zhang
Huan Zhang

Reputation: 1085

how to implement youtube videos in AMP-html

I am trying to implement youtube videos within AMP articles by following the official documentation found here:

https://github.com/ampproject/amphtml/blob/master/extensions/amp-youtube/amp-youtube.md

But the youtube video is simply not rendering at all.

Here is what my Jade template looks like:

amp-youtube(data-videoid="#{videoId}", layout="responsive", width="480", height="270")

and the output is this:

<amp-youtube data-videoid="lZShEy8ILvg" layout="responsive" width="480" height="270"></amp-youtube>

It looks to be fine but I'm not sure why the youtube video is not being inserted into the amp-youtube tag.

Any suggestions are well appreciated!

Upvotes: 0

Views: 930

Answers (1)

Huan Zhang
Huan Zhang

Reputation: 1085

Nevermind, I forgot to add the amp-youtube script in the document head...

Upvotes: 1

Related Questions