Skip to content

Commit

Permalink
chore(embed): extend media list, remove img_path from video and typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMurdock11 authored and cotes2020 committed Apr 2, 2024
1 parent 9850488 commit e257438
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions _data/media.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@
mimeType: x-msvideo
- extension: mkv
mimeType: x-matroska
- extension: ogv
mimeType: ogg
- extension: weba
mimeType: webm
- extension: 3gp
mimeType: 3gpp
- extension: 3g2
mimeType: 3gpp2
- extension: mid
mimeType: midi
2 changes: 1 addition & 1 deletion _includes/embed/video.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{% unless video_url contains '://' %}
{%- capture video_url -%}
{% include img-url.html src=video_url img_path=page.img_path %}
{% include img-url.html src=video_url %}
{%- endcapture -%}
{% endunless %}

Expand Down
6 changes: 3 additions & 3 deletions _posts/2019-08-08-write-a-new-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,16 +496,16 @@ Consider an example utilizing all of the above:

### Audio File

If you want to embed a audio file directly, use the following syntax:
If you want to embed an audio file directly, use the following syntax:

```liquid
{% include embed/audio.html src='{URL}' %}
```
Where `URL` is an URL to a audio file e.g. `/assets/img/sample/audio.mp3`.
Where `URL` is an URL to an audio file e.g. `/assets/img/sample/audio.mp3`.

You can also specify additional attributes for the embedded audio file. Here is a full list of attributes allowed.

- `title='Text'` - title for a audio that appears below the audio and looks same as for images
- `title='Text'` - title for an audio that appears below the audio and looks same as for images
- `types` - specify the extensions of additional audio formats separated by `|`. Ensure these files exist in the same directory as your primary audio file.

Consider an example utilizing all of the above:
Expand Down

0 comments on commit e257438

Please sign in to comment.