如何将YouTube播放列表嵌入雨果网站
我可以使用以下代码,{{< youtube hvWSg6NblSU >}}
to embed the YouTube video in hugo website, where hvWSg6NblSU is the value in following url: https://www.youtube.com/watch?v=hvwsg6nblsu
我不想嵌入以下播放列表:
我可以嵌入上面的播放列表。基本上,我正在尝试使用Hugo制作页面,该页面将在YouTube上显示播放列表。
在以下链接中: https://naresh-chaurasia.github.io/ talk2naresh/course/python-kids/,我有一个YouTube视频,但想使用Hugo添加到整个播放列表的链接。是否可以。
尽管我可以为播放列表创建超链接,但我想显示YouTube播放列表。
谢谢。
I can make use of the following code, {{< youtube hvWSg6NblSU >}}
to embed the YouTube video in hugo website, where hvWSg6NblSU is the value in following url: https://www.youtube.com/watch?v=hvWSg6NblSU
Instead of embedding a single video, I want to embed the following playlist: https://www.youtube.com/playlist?list=PLDe3_HhjV1foHQbtGpdo0FSmsMrVykuKJ
Question: Is there a way I can embed the above playlist. Basically I am trying to make a page using hugo which will show the playlist on YouTube.
In the following link: https://naresh-chaurasia.github.io/talk2naresh/course/python-kids/, I have a single YouTube video but want to add link to entire playlist using hugo. Is it possible.
Although I can create a hyperlink to the playlist, but I want to display the YouTube playlist.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它不受内置的YouTube快速代码的支持。
您可以做的是为播放列表创建一个新的YouTube快速代码。
步骤
/layouts/shortcodes/youtubepl.html
(一边:如果您希望具有不同的短代码名称,请更改文件名,例如更改文件名。 ;
,如果您喜欢
{{& lt 代码> {{&lt; YouTube&gt;}}
快捷代码,只需使用新的快捷代码名称:{{&lt; youtubepl id =“ id here”&gt;}}}
或{{&lt; youtubepl id-here&gt;}}
。It is not supported by the built-in youtube shortcode.
What you can do is create a new youtube shortcode for playlists.
Steps
/layouts/shortcodes/youtubepl.html
(aside: If you prefer to have a different shortcode name, simply change the filename. For example, if you prefer to use
{{< ytplaylist >}}
change the shortcode filename toytplaylist.html
.)Usage
{{< youtube >}}
shortcode, just use the new shortcode name like so:{{< youtubepl id="ID-HERE" >}}
or{{< youtubepl ID-HERE >}}
.