Created
February 17, 2019 23:17
-
-
Save jdkato/b9f3e9d74059a9d91df51c7fd2365bde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def main(meta, video, clip=[]): | |
| """Example directive for including a YouTube video. | |
| `meta` is a dictionary containing any front matter that was | |
| listed in the Markdown file. | |
| `clip` specifies an optional start and stop point for the video. | |
| """ | |
| link = "https://www.youtube.com/embed/{0}".format(video) | |
| if clip: | |
| link += "?start={0}&end={1}".format(*clip) | |
| return '<iframe src="{0}"></iframe>'.format(link) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment