mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-05-06 14:41:02 -05:00
feat: read version number from composer.json
this enables any cached css files to automatically to be discarded on release of a new version. Signed-off-by: Zoë Bijl <hiworks@hello.moiety.me> Signed-off-by: Zoë <hiworks@hello.moiety.me> Signed-off-by: Zoë <code@moiety.me>
This commit is contained in:
parent
c86b1b687b
commit
dc352478b5
@ -1,3 +1,11 @@
|
||||
<?php
|
||||
// Get and decode composer.json
|
||||
$content = file_get_contents(__DIR__ . '/../../../composer.json');
|
||||
$content = json_decode($content, true);
|
||||
|
||||
// Get the version number
|
||||
$version = $content['version'];
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
@ -9,9 +17,9 @@
|
||||
@yield('title')
|
||||
</title>
|
||||
@if(isset($front) && $front == false)
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/back/start.css?=sdfsdf">
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/back/start.css?v=<?php echo($version); ?>">
|
||||
@elseif(!isset($front) || $front == true)
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/front/start.css?=sdfsdf">
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/front/start.css?v=<?php echo($version); ?>">
|
||||
@endif
|
||||
|
||||
</head>
|
||||
|
Loading…
x
Reference in New Issue
Block a user