$site->audio()

Returns a $files collection with all audio files placed directly in /content

  • return ($files)

Example

<h2>Songs</h2>
<?php foreach($site->audio() as $audio): ?>
<audio controls>
  <source src="<?= $audio->url() ?>" type="<?= $audio->mime() ?>">
</audio>
<?php endforeach ?>