feat: add the example post about embed video

This commit is contained in:
saicaca
2023-10-19 23:12:55 +08:00
parent 377ff3a4cc
commit 1ccf80f9a2
4 changed files with 35 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
---
title: 'Cover Image Example'
published: 2022-09-09
published: 2023-09-01
description: 'How to set a cover image using the cover attribute.'
cover:
url: 'https://saicaca.github.io/vivia-preview/assets/79905307_p0.jpg'

View File

@@ -1,6 +1,6 @@
---
title: Markdown Example
published: 2023-10-18
published: 2023-10-01
description: A simple example of a Markdown blog post.
cover:
url:

View File

@@ -0,0 +1,27 @@
---
title: Include Video in the Posts
published: 2022-08-01
description: This post demonstrates how to include embedded video in a blog post.
cover:
url:
alt:
tags: [Example, Video]
categories: []
---
Just copy the embed code from YouTube or other platforms, and paste it in the markdown file.
```yaml
---
title: Include Video in the Post
published: 2023-10-19
// ...
---
<iframe width="100%" height="468" src="https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_" title="YouTube video player" frameborder="0" allowfullscreen></iframe>
```
## YouTube
<iframe width="100%" height="468" src="https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
## Bilibili
<iframe width="100%" height="468" src="//player.bilibili.com/player.html?bvid=BV1fK4y1s7Qf&p=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>