From 689f911cb3d04a9cd7450c8c3c6ed817140c77a8 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Sat, 31 Jul 2021 04:17:50 -0700 Subject: [PATCH] LDoc: new tags for embedding videos --- .ldoc/config.ld | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.ldoc/config.ld b/.ldoc/config.ld index 8703578..c183c39 100644 --- a/.ldoc/config.ld +++ b/.ldoc/config.ld @@ -28,11 +28,35 @@ new_type("setting", "Settings") new_type("tool", "Tools") new_type("json", "JSON Configurations") + +local function video_frame(src) + return '' +end + custom_tags = { { "privs", title = "Required Privileges", }, + { + "video", + title = "Video", + format = video_frame, + }, + { + "youtube", + title = "Video", + format = function(value) + return video_frame("https://www.youtube.com/embed/" .. value) + --[[ + return '' + ]] + end, + }, -- settings { "settype",