How to use video

I have video file: https://object.readmorejoy.com/self/1576392627610795.mp4

want to display with hugo

how to do ti?

try

{{< video autoplay="true" loop="true" src="https://object.readmorejoy.com/self/1576392627610795.mp4" >}}

result is:
Error: Error building site: “/Users/jiangzhixiang/Worker/loveweb/readmorejoy_web/content/post/201912/link_to.md:22:1”: failed to extract shortcode: template for shortcode “video” not found

I use jane theme, jane no video shortcode support.

I use iframe or video, can not display video.

Since the Jane theme does not provide a video shortcode, you need to create it yourself under the /layouts/ directory and then reference it from your project’s content files.

Please see:

1 Like

@alexandros Can correct me if I’m wrong but isn’t HTML allowed in markup files? This looks well on its way to being a proper HTML video tag.

If using Hugo 0.60.+ then the unsafe flag needs to be set in the config for Goldmark (the new Markdown parser) to accept the HTML.

However the video HTML element syntax in the above quote is not quite right.

Also for Hugo to process the raw video HTML element it needs to be entered without the brackets.
The brackets indicate a shortcode. If such a shortcode does not exist then the user will experience the already mentioned console ERROR.

Gotcha. I was going to bring up your other two points but wanted to make sure I was on the right track first.

I add video shortcode. now video can play.
thanks thanks