$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="<?php echo $audio->url() ?>" type="<?php echo $audio->mime() ?>">
</audio>
<?php endforeach ?>