Add audio shortcode
This commit is contained in:
parent
6e8c34a4cc
commit
9c14e95be8
1 changed files with 5 additions and 0 deletions
5
layouts/shortcodes/audio.html
Normal file
5
layouts/shortcodes/audio.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ $id := .Get "id" }}
|
||||
{{ $mp3 := (.Page.Resources.GetMatch (.Get "mp3")) }}
|
||||
<audio {{ with $id }}id="{{ . }}"{{ end }}>
|
||||
{{ with $mp3 }}<source src="{{ . }}" type="audio/mpeg">{{ end }}
|
||||
</audio>
|
Loading…
Add table
Add a link
Reference in a new issue