Kitchin on Embedding Org in HTML

John Kitchin has an interesting post on embedding Org documents in HTML. The idea is that you embed the Org in a data URI so that the user can click on the URI and see the Org code. This is useful if you are using Org mode to write HTML documents and want to make the original Org code available to the user for inspection.

For example, if you click on this source link, you will see the Org document that I used to generate this post. The Org code is base64-encoded and inserted into the link. The code to do all this is pretty simple. You can check Kitchin's post for the details.

The whole idea may seem a bit odd. After all, you could just provide a link to Org file if you wanted to make it available. You can read about his original motivation in this post about a previous implementation. Whether or not you find it useful, you have to admit that it's a neat trick. And, of course, you could use it to embed whatever you like in the file.

This entry was posted in General and tagged , . Bookmark the permalink.