Playing Audio from content

Can someone help me play audio on my static site? I have search around and honestly I think part of it is my brain is burnt out. after putting together a whole site today.
I have the audio widget showing up on my page.
Here is the div in my index.html

    <!--This gets the path to the audio-->
        <audio class="player" controls  preload="none">
            <source src="{{ .Params.audioFile }}" type="audio/mp3">
        </audio>

here is the content of content/episodes/Ep001/index.md
+++
audioDuration = “00:5:00”
audioFile = “Ep001.mp3”
audioSize = 30310616
date = “2019-04-12”
description = “More Rocking”
draft = false
episodeNumber = 001
title = “Rockgasms”
image="/img/rainbow.jpg"
linked = true
+++
Audio file is located at content/episodes/Ep001/Ep001.mp3

I know its something I nee here but I don’t know what:

I’ve got a theme which has an audio player - see: https://github.com/funkydan2/alpha-church/blob/master/layouts/sermons/single.html#L16-L19

But I’m going to guess your issue is with the file path. I reckon you either need to set audioFile = 'episodes/Ep001/Ep001.mp3 in the page frontmatter, or if you’re always going to store the audiofile in this location, change your layout to something like

<audio class="player" controls  preload="none">
    <source src="{{ .Permalink}}/{{ .Params.audioFile }}" type="audio/mp3">
</audio>
4 Likes

Sorry for the delay in getting to a response. Thanks, I have that part working now…just need to figure out the rss builder and I’m ready to go live

Glad to help. For your RSS feed, there are some changes with this since version 0.55. There was a thread about it on the forum a few weeks back, so search the forums for some hints and code samples.

Thanks so much for this info. Like the OP here, I struggled to find anything about including an audio file in my hugo blog pages but this post helped me sort it out!