$site->videos()

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

  • return ($files)

Example

<h2>Videos</h2>
<?php foreach($site->videos() as $video): ?>
<video width="300" height="200" controls>
  <source src="<?= $video->url() ?>" type="<?= $video->mime() ?>">
</video>
<?php endforeach ?>