feat: add bilibili embed video support (#1406)
--------- Co-authored-by: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
This commit is contained in:
parent
2a4fbf6a79
commit
4a2b89d0b6
3 changed files with 17 additions and 7 deletions
10
_includes/embed/bilibili.html
Normal file
10
_includes/embed/bilibili.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<iframe
|
||||||
|
class="embed-video bilibili"
|
||||||
|
loading="lazy"
|
||||||
|
src="https://player.bilibili.com/player.html?bvid={{ include.id }}"
|
||||||
|
scrolling="no"
|
||||||
|
border="0"
|
||||||
|
frameborder="no"
|
||||||
|
framespacing="0"
|
||||||
|
allowfullscreen="true"
|
||||||
|
></iframe>
|
|
@ -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.
|
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 |
|
| 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.**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.**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
|
## Learn More
|
||||||
|
|
||||||
|
|
|
@ -551,7 +551,8 @@ main {
|
||||||
|
|
||||||
@extend %rounded;
|
@extend %rounded;
|
||||||
|
|
||||||
&.youtube {
|
&.youtube,
|
||||||
|
&.bilibili {
|
||||||
aspect-ratio: 16 / 9;
|
aspect-ratio: 16 / 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue