Html - not working
Elements - can’t {{}} source audio
Doobox - tired {{item.audio.mp3}} {{item.audio}}
<div style="max-width:400px; margin:0 auto; text-align:center;">
<audio controls preload="metadata" style="width:100%;border-radius:8px;">
<source src="{{item.audio}}" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</div>
Okay, so you have quite a few problems going on here
Here’s how to fix them…
If you’e building your own Custom CMS Components you need to wrap the twig tags in @raw, like this:
<div style="max-width:400px; margin:0 auto; text-align:center;">
<audio controls preload="metadata" style="width:100%;border-radius:8px;">
<source src="@raw(){{item.audio}}@endraw" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</div>
Your other problem is file naming, you need to ensure all your audio files use web safe names, and that your Markdown files also reference web safe names.