thegeeklab/hugo-geekdoc

Provide an audio shortcode

Miepee opened this issue · 0 comments

It'd be nice to provide an audio shortcode in order to more easily show audio.

For me personally, something like:

<audio controls preload="auto">
    <source src="{{ .Get "src" }}">
</audio>

with the usage of

{{ <audio src="./relative/path/to/file.mp3" > }}

would completely suffice. But I don't know if other people have different requirements that they need.

Something that would be nice tho, is to have an optional param to display the filename (i.e. file.mp3 in the above example.)