how to include video in jekyll markdown blog

后端 未结 6 2040
日久生厌
日久生厌 2020-12-23 16:00

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?

Also, I dont really like t

6条回答
  •  悲哀的现实
    2020-12-23 17:00

    One of the nicer features of WordPres is that you can just paste a Youtube URL in the content (on a new line) and WordPress transforms this into an embed code.

    The following code does the same for Jekyll. Just put this code in your footer (or use a Jekyll include) and all paragraphs with JUST a Youtube URL are automagically converted to responsive Youtube embeds by Vanilla JS.

    
    
    
    

    Although just adding the HTML code to your Markdown is a very good (maybe even better) and valid solution, this solution might be more user-friendly.

    (Source)

提交回复
热议问题