Remove exhibition links

This commit is contained in:
Paul Nicoué 2025-05-01 16:09:33 +02:00
parent 84de819756
commit aa60c4d52b
5 changed files with 5 additions and 100 deletions

View file

@ -2,28 +2,18 @@
return function ($site) {
// Get exhibitions field content (stored as yaml) and parse it to return an array
$exhibitions = $site->exhibitions()->yaml();
// Add url based title to each exhibition
foreach ($exhibitions as &$exhibition) {
$exhibition['title'] = str_replace(['http://', 'https://', 'www.', '.html'], '', $exhibition['url']);
$exhibition['title'] = rtrim($exhibition['title'], '/');
}
// Get image files section content
$images = $site->files()->template("full_screen_image")->shuffle();
// Get contact fields content
$email = $site->email();
$instagram = $site->instagram();
$portfolio = $site->portfolio()->toFile();
// Get image files section content
$images = $site->files()->template("full_screen_image")->shuffle();
return [
'exhibitions' => $exhibitions,
'images' => $images,
'email' => $email,
'instagram' => $instagram,
'portfolio' => $portfolio,
'images' => $images
'portfolio' => $portfolio
];
};