From 7b84f5b67085c280d7e649e2910fd2a5f8a99665 Mon Sep 17 00:00:00 2001 From: Javier Olaechea Date: Thu, 27 Oct 2016 16:48:07 -0500 Subject: [PATCH] Add 3bmd youtube plugin This plugin allows users to use a shorthand syntax to embed youtube videos in markdown Closes #124 --- docs/plugin-use.md | 11 +++++++++++ plugins/3bmd-youtube.lisp | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 plugins/3bmd-youtube.lisp diff --git a/docs/plugin-use.md b/docs/plugin-use.md index de2b557..d098414 100644 --- a/docs/plugin-use.md +++ b/docs/plugin-use.md @@ -202,3 +202,14 @@ CL-USER> (chirp:complete-authentication "4173325") :output "/home/redlinernotes/blog/")` [config_file]: http://github.com/redline6561/coleslaw/blob/master/examples/example.coleslawrc + + +## Markdown Embeding youtube Youtube + +**Description**: Embed youtube videos in markdown using the shorthand syntax +`!yt[(|options*)*]`. Options can be *width*, *height* or any of the +[player parameters](https://developers.google.com/youtube/player_parameters). + +For example `!yt[oeul8fTG9dM|width=480,allowfullscreen]`. + +**Example**: `(3bmd-youtube)` diff --git a/plugins/3bmd-youtube.lisp b/plugins/3bmd-youtube.lisp new file mode 100644 index 0000000..48f2eba --- /dev/null +++ b/plugins/3bmd-youtube.lisp @@ -0,0 +1,12 @@ +(eval-when (:compile-toplevel :load-toplevel) + (ql:quickload :3bmd-youtube)) + +(defpackage #:coleslaw-3bmd-youtube + (:use #:cl) + (:export + #:enable)) + +(in-package #:coleslaw-3bmd-youtube) + +(defun enable () + (setf 3bmd-youtube:*youtube-embeds* t))