oembed icon indicating copy to clipboard operation
oembed copied to clipboard

Allow for static sites to be discoverable without a true endpoint

Open goodevilgenius opened this issue 8 years ago • 1 comments

I was thinking about how a static site might support oEmbed, and, it seems impossible currently if complying to the full spec.

I was thinking the spec could be changed so that it might be possible for such sites to be discoverable, with static json and xml files, without a true endpoint.

E.g., imagine a blog hosted at http://example.com/ that is built with Jekyl. A single blog post might be at http://example.com/2015/10/my-post.html. Within the <head> for that page, would be <link> tags for oEmbed discovery, which might say:

<link rel="alternate" type="application/json+oembed"
  href="http://example.com/oembed/2015/10/my-post.json" title="My Post oEmbed Profile" />
<link rel="alternate" type="text/xml+oembed"
  href="http://example.com/oembed/2015/10/my-post.xml" title="My Post oEmbed Profile" />

However, there would be no true endpoint. You couldn't, e.g., GET http://example.com/oembed?url=http%3A%2F%2Fexample.com%2F2015%2F10%2Fmy-post.html&format=json.

This would provide a lower barrier for small sites to support their own oEmbed.

goodevilgenius avatar Apr 08 '16 21:04 goodevilgenius

To take this idea a step further I think it would be nice for static sites to provide the entire json response inline in the page. Similar to how CSS can be included via a link tag or inlined.

twalling avatar May 04 '16 20:05 twalling