Skip to content

Commit

Permalink
chore: add video post
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesrocket committed Jan 25, 2024
1 parent bf6110a commit 3d2a0f2
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions content/posts/video/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
+++
title = "Video"
date = 2023-06-04
[taxonomies]
categories = ["media"]
tags = ["content", "shortcode"]
[extra]
subtitle = "Shortcodes for videos"
+++

## Vimeo

input:

```rs
{{/* vimeo(id="4340383") */}}
```

- `id`: the video id (mandatory)
- `autoplay`: when set to "true", the video autoplays on load (optional)
- `loop`: when set to "true", the video plays on a loop (optional)
- `noautopause`: when set to "true", the video will not autopause (optional)
- `title` - set alt title for the iframe (optional, defaults to "Vimeo")
- `cookie` - set to "true" if you want tracking cookies, otherwise it defaults to false.

output:

```html
{{ vimeo(id="4340383") }}
```
{{ vimeo(id="4340383") }}

## YouTube

input:

```rs
{{/* youtube(id="frBzlP6t9Gw") */}}
```

- `id`: the video id (mandatory)
- `playlist`: the playlist id (optional)
- `autoplay`: when set to "true", the video autoplays on load (optional)
- `title` - set alt title for the iframe (optional, defaults to "Youtube")
- `cookie` - set to "true" if you want tracking cookies, otherwise it defaults to false.

output:

```html
{{ youtube(id="frBzlP6t9Gw") }}
```
{{ youtube(id="frBzlP6t9Gw") }}

0 comments on commit 3d2a0f2

Please sign in to comment.