From 4a2b89d0b698d672486349131a89025fa47afcb6 Mon Sep 17 00:00:00 2001 From: Mill Haruto Date: Sat, 9 Dec 2023 21:48:19 +0800 Subject: [PATCH] feat: add bilibili embed video support (#1406) --------- Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com> --- _includes/embed/bilibili.html | 10 ++++++++++ _posts/2019-08-08-write-a-new-post.md | 11 +++++------ _sass/addon/commons.scss | 3 ++- 3 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 _includes/embed/bilibili.html diff --git a/_includes/embed/bilibili.html b/_includes/embed/bilibili.html new file mode 100644 index 0000000..eaa09d8 --- /dev/null +++ b/_includes/embed/bilibili.html @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/_posts/2019-08-08-write-a-new-post.md b/_posts/2019-08-08-write-a-new-post.md index 1da7b0d..9240f05 100644 --- a/_posts/2019-08-08-write-a-new-post.md +++ b/_posts/2019-08-08-write-a-new-post.md @@ -424,12 +424,11 @@ Where `Platform` is the lowercase of the platform name, and `ID` is the video ID The following table shows how to get the two parameters we need in a given video URL, and you can also know the currently supported video platforms. -| Video URL | Platform | ID | -|----------------------------------------------------------------------------------------------------|-----------|:--------------| -| [https://www.**youtube**.com/watch?v=**H-B46URT4mg**](https://www.youtube.com/watch?v=H-B46URT4mg) | `youtube` | `H-B46URT4mg` | -| [https://www.**twitch**.tv/videos/**1634779211**](https://www.twitch.tv/videos/1634779211) | `twitch` | `1634779211` | - - +| Video URL | Platform | ID | +| -------------------------------------------------------------------------------------------------- | ---------- | :------------- | +| [https://www.**youtube**.com/watch?v=**H-B46URT4mg**](https://www.youtube.com/watch?v=H-B46URT4mg) | `youtube` | `H-B46URT4mg` | +| [https://www.**twitch**.tv/videos/**1634779211**](https://www.twitch.tv/videos/1634779211) | `twitch` | `1634779211` | +| [https://www.**bilibili**.com/video/**BV1Q44y1B7Wf**](https://www.bilibili.com/video/BV1Q44y1B7Wf) | `bilibili` | `BV1Q44y1B7Wf` | ## Learn More diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index 78b7a89..c50bbff 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -551,7 +551,8 @@ main { @extend %rounded; - &.youtube { + &.youtube, + &.bilibili { aspect-ratio: 16 / 9; }