Initial commit

This commit is contained in:
isUnknown 2026-02-12 15:22:46 +01:00
commit 65e0da7e11
1397 changed files with 596542 additions and 0 deletions

View file

@ -0,0 +1,27 @@
<?php
return function ($site, $pages, $page) {
$releases = $page->children()->published();
$songs = '[';
foreach ($releases as $key => $release){
$tracks = $release->tracklist()->toStructure();
foreach ($tracks as $key => $track){
if ($file = $track->audioFile()->toFile()){
$songs .= esc('{"url": "'.$file->url().'","song_title": "'.$page->title()->html().'&nbsp;—&nbsp;'.$track->title()->html().'"},');
}
}
}
if(strlen($songs) > 1) $songs = substr($songs, 0, -1);
$songs .= ']';
return array(
'ptemplate' => $page->intendedTemplate(),
'artists' => $site->index()->published()->filterBy('intendedTemplate', 'artist'),
'medias' => $page->medias()->shuffle(),
'releases' => $releases,
'songs' => $songs
);
}
?>