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

查看:162
本文介绍了如何在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天全站免登陆