如何在org2blog中插入外部URL视频
通过查看 WordPress 的HTML源码,可以看到视频是通过 video
tag来实现的,它的格式差不多是这样的
<video class="wp-video-shortcode" id="video36-1" width="640" height="360" preload="metadata" controls="controls"><source type="video/mp4" src="https://raw.githubusercontent.com/lujun9972/baby/master/%E5%AE%B6/images/Baby%E8%BF%BD%E5%A6%B9%E8%AE%B01.mp4" /><a href="https://raw.githubusercontent.com/lujun9972/baby/master/%E5%AE%B6/images/Baby%E8%BF%BD%E5%A6%B9%E8%AE%B01.mp4">https://raw.githubusercontent.com/lujun9972/baby/master/%E5%AE%B6/images/Baby%E8%BF%BD%E5%A6%B9%E8%AE%B01.mp4</a></video>
因此我们可以通过在org-mode中直接插入HTML代码的方式来插入外部URL视频:
#+begin_export html <video class="wp-video-shortcode" width="640" height="360" preload="metadata" controls="controls"><source type="video/mp4" src="https://raw.githubusercontent.com/lujun9972/baby/master/%E5%AE%B6/images/Baby%E8%BF%BD%E5%A6%B9%E8%AE%B01.mp4" /><a href="https://raw.githubusercontent.com/lujun9972/baby/master/%E5%AE%B6/images/Baby%E8%BF%BD%E5%A6%B9%E8%AE%B01.mp4">https://raw.githubusercontent.com/lujun9972/baby/master/%E5%AE%B6/images/Baby%E8%BF%BD%E5%A6%B9%E8%AE%B01.mp4</a></video> #+end_export
或者
#+BEGIN_video #+HTML: <source type="video/mp4" src="https://raw.githubusercontent.com/lujun9972/baby/master/%E5%AE%B6/images/Baby%E8%BF%BD%E5%A6%B9%E8%AE%B01.mp4" /> #+HTML: <a href="https://raw.githubusercontent.com/lujun9972/baby/master/%E5%AE%B6/images/Baby%E8%BF%BD%E5%A6%B9%E8%AE%B01.mp4" ></a> #+END_video