I had envisioned video posts working like this: In the "code" field, the user can enter a URL or embed code, and Commonplace parses the text.
If the text is a plain URL from YouTube or Vimeo, Commonplace will place it in a standard YouTube / Vimeo embed template. (Maybe the easiest way to do this is to have another YAML variable in the generated post, like video-source-type, that we can use for conditional markup within the post template.)
If the text is an embed code from YouTube or Vimeo, Commonplace parses out the URL from it and uses its own embed template.
If the text is an embed code from an external site, don't touch it. The output should display that embed as-is.
If the text is a plain URL that is not from Vimeo or YouTube, display an error message. We have placeholder text explaining the rules already so this isn't punishing the user too badly.
I had envisioned video posts working like this: In the "code" field, the user can enter a URL or embed code, and Commonplace parses the text.
video-source-type
, that we can use for conditional markup within the post template.)