It looks like my new host - NearlyFreeSpeech - is causing Kirby to not properly detect the base URL when used in a subfolder.
I initially thought it was a mod_rewrite issue, but I think now it’s a base URL issue.
To troubleshoot, I tried to manually set the base URL in config.php
to 'url' => '/starterkit'
.
However, I get this in the home page source:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Mægazine | Home</title>
<link href="/starterkit/assets/css/prism.css" rel="stylesheet">
<link href="/starterkit/assets/css/lightbox.css" rel="stylesheet">
<link href="/starterkit/assets/css/index.css" rel="stylesheet">
<link href="/starterkit/starterkit/assets/css/templates/home.css" rel="stylesheet">
<link rel="shortcut icon" type="image/x-icon" href="/starterkit/favicon.ico">
</head>
The base URL is generated twice for home.css
, but not others.
In the header snippet, the URLs are generated by:
<?= css([
'assets/css/prism.css',
'assets/css/lightbox.css',
'assets/css/index.css',
'@auto'
]) ?>
So whatever @auto
is doing, it’s somehow printing the base URL twice.