From da4320e8a56343ad37a4604e61915675fa18a270 Mon Sep 17 00:00:00 2001 From: lryong <15816537946@163.com> Date: Fri, 11 Sep 2020 00:27:28 +0800 Subject: [PATCH] feat(shortcodes): support bilibili video (#294) Closes #278 Co-authored-by: Herbert Lu --- layouts/shortcodes/bilibili.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 layouts/shortcodes/bilibili.html diff --git a/layouts/shortcodes/bilibili.html b/layouts/shortcodes/bilibili.html new file mode 100644 index 0000000..005eccb --- /dev/null +++ b/layouts/shortcodes/bilibili.html @@ -0,0 +1,23 @@ + +{{ $videoID := index .Params 0 }} +{{ $pageNum := index .Params 1 | default 1 }} + +{{ if (findRE "^[bB][vV][0-9a-zA-Z]+$" $videoID) }} +
+{{ else }} +
+{{ end }} + +