Edit website structure

This commit is contained in:
Paul Nicoué 2022-07-21 17:20:07 +02:00
parent 2b79d762b3
commit 5921d2fafe
19 changed files with 104 additions and 110 deletions

View file

@ -1,16 +0,0 @@
<?php
return function ($page) {
// Get exhibitions field content (stored as yaml) and parse it to return an array
$exhibitions = $page->exhibitions()->yaml();
// Add url based title to each exhibition
foreach ($exhibitions as &$exhibition) {
$exhibition['title'] = str_replace(['http://', 'https://', 'www.'], '', $exhibition['url']);
}
return [
'exhibitions' => $exhibitions
];
};