如何在 jekyll markdown 博客中包含视频 [英] how to include video in jekyll markdown blog

查看:24
本文介绍了如何在 jekyll markdown 博客中包含视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用 jekyll 写博客.我用 Markdown 写我的帖子.现在,我想在我的帖子中包含一个 youtube 视频.我该怎么做?

I just started blogging using jekyll. I write my posts in markdown. Now, I want to include a youtube video in my post. How can I do this?

另外,我不太喜欢 jekyll 默认提供的 pygments 突出显示.无论如何我可以将其更改为其他样式吗?如果是的话,你能指点我一些不错的样式/插件吗?

Also, I dont really like the pygments highlighting provided by jekyll by default. Is there anyway I can change this to some other style? If yes, can you point me to some nice styles/plugins?

推荐答案

您应该能够将要嵌入的 HTML 直接放入您的 Markdown 中.在视频下方,有一个分享"按钮,点击它,然后点击嵌入"按钮,它应该会给你一些看起来像的东西:

You should be able to put the HTML for embedding directly into your markdown. Under the video, there is a "Share" button, click on this, and then the "Embed" button, which should give you something that looks a little like:

<iframe width="420" height="315" src="http://www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0" allowfullscreen></iframe>

只需将其复制并粘贴到您的帖子中,Markdown 预处理器就不会触及它.

Just copy and paste that into your post, the Markdown preprocessor won't touch it.

对于 Pygments,这个仓库中有一大堆各种颜色主题的 CSS 样式表,你可以用它们来试验.(请注意,您必须将 .codehilite 替换为 .highlight 才能与 Jekyll 一起使用.)

For Pygments, there is a whole pile of CSS stylesheets for various colour themes in this repository, you could experiment with them. (Note that you will have to replace .codehilite with .highlight for these to work with Jekyll.)

这篇关于如何在 jekyll markdown 博客中包含视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆