Embedding External Content - novoid/lazyblorg GitHub Wiki

Orgmode Elements > Embedding External Content


Using HTML blocks, you can embed arbitrary things into your blog articles. This page summarizes common snippets you might as well want to use in yasnippet templates.

Please do read about HTML blocks to include HTML snippets such as tweets or YouTube videos. For embedding images, please do refer to this page instead.

Embed Tweets into Your Blog Article

There was no need to develop something specific. Just follow following procedure:

  1. insert an HTML block into your Org blog article
    • Easily done via entering <h + pressing the TAB key
  2. go to the tweet you would like to embed in your browser
    • select the three dots below the Tweet
    • select “Embed Tweet”
    • copy resulting snippet
  3. paste snippet into HTML block

Simple as that.

Example:

#+BEGIN_EXPORT HTML
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">You gotta love <a href="https://twitter.com/slydigsband">@slydigsband</a> - tune into <a href="https://t.co/7yylPwDKvi">https://t.co/7yylPwDKvi</a><br>I just bought the album. Guys, you really rock! Thanks for your Vienna gig!</p>&mdash; Karl Voit (@n0v0id) <a href="https://twitter.com/n0v0id/status/776735121823174656">September 16, 2016</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
#+END_EXPORT

Embed YouTube Videos

  1. insert an HTML block into your Org blog article
    • Easily done via entering <h + pressing the TAB key
  2. retrieve the YouTube URL of your video
  3. replace (only!) HTVgPw7TR_k in the snippet example below with the video ID of your video

Example:

#+BEGIN_EXPORT HTML
<iframe width="560" height="315" src="http://www.youtube.com/embed/HTVgPw7TR_k?rel=0" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
#+END_EXPORT
⚠️ **GitHub.com Fallback** ⚠️