Embed Audio

The audio short code generates an embedded audio object for HTML websites. You can use it with:

{{< audio file="assets/my-audio.mp3" caption="Sample Audio File">}}

For example, the above shortcode embeds the my-audio.mp3 in assets/ as:

Sample Audio File

Options

Keyword Argument Default Value Description
file "" Specifies the input file path for the audio element.
caption "" Specifies the caption for the audio element.
class "" Specifies the class attribute for the figure element.
download-link "false" Specifies whether to include a download link.

You may also omit specifying a file option. We’ll automatically use the first parameter as the file