html - <video> in Markdown -
using <video>
in jekyll markdown parsing raw text, how can <video>
work?
<div class="row post-image-bg" markdown="1"> <video width="99%" height="540" autoplay loop muted markdown="1"> <source src="/images/posts/send-cancel.mp4" type="video/mp4" markdown="1" > <source src="/images/posts/send-cancel.webm" type="video/webm" markdown="1"> </video> </div>
explanation
you have markdown="1"
attribute in every single element, tells markdown processor parse contents of element.
now contents of element indented in normal html style. however, markdown parses indentation as.. guessed it: code blocks. markdown sees is:
... <video ...> ... </video> ...
note 4 spaces before video
tags here. stackoverflow.com, these markdown code blocks.
solutions
there several fixes this:
turn off markdown processing locally
change markdown="1"
markdown="0"
. or rid of it. i'm not sure why have attribute everywhere.
turn off markdown parsing file
rename file .md
.html
, or other extension not specified markdown _config.yml
.
prevent markdown recognizing code block
unindent html. know looks ugly, it's way stop markdown recognizing "code".
Comments
Post a Comment