feat(*): refactor dynamic vs. static structure and distinctions; make additional elements dynamic
This commit is contained in:
parent
7a0b808f24
commit
69da20fd8e
127 changed files with 984 additions and 956 deletions
26
src/includes/dynamic/fetchers/artist.php.liquid
Normal file
26
src/includes/dynamic/fetchers/artist.php.liquid
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
require __DIR__ . "/../../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../../config/dynamic/init.php";
|
||||
|
||||
use App\Classes\ArtistFetcher;
|
||||
|
||||
$requestUri = $_SERVER["REQUEST_URI"];
|
||||
$url = trim(parse_url($requestUri, PHP_URL_PATH), "/");
|
||||
|
||||
if (strpos($url, "music/artists/") !== 0) redirectTo404();
|
||||
|
||||
$fetcher = new ArtistFetcher();
|
||||
$artist = $fetcher->fetch($url);
|
||||
|
||||
if (!$artist) redirectTo404();
|
||||
|
||||
$artist["description_html"] = parseMarkdown($artist["description"]);
|
||||
$artist["globals"] = $fetcher->getGlobals();
|
||||
$page = $artist;
|
||||
|
||||
extract(setupPageMetadata($page, $requestUri));
|
||||
header("Cache-Control: public, max-age=3600");
|
||||
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 3600) . " GMT");
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue