Static website configuration

Hi folks,

Iโ€™m using this cool plugin by d4l-data4life to generate a static version for one of my websites Here is the structure of my folder, as hosted on my clientโ€™s FTP:

๐Ÿ“„ .htaccess
๐Ÿ“ assets
๐Ÿ“ content
๐Ÿ“„ index.php
๐Ÿ“ kirby
๐Ÿ“ media
๐Ÿ“ site
๐Ÿ“ static

And here is my config.php file:

return [
  'languages' => true,
  'debug' => true,
  'home' => 'about',
  'd4l' => [
    'static_site_generator' => [
      'endpoint' => 'generate-static-site', # set to any string like 'generate-static-site' to use the built-in endpoint (necessary when using the blueprint field)
      'output_folder' => './static', # you can specify an absolute or relative path
      'preserve' => [], # preserve individual files / folders in the root level of the output folder (anything starting with "." is always preserved)
      'base_url' => '/', # if the static site is not mounted to the root folder of your domain, change accordingly here
      'skip_media' => false, # set to true to skip copying media files, e.g. when they are already on a CDN; combinable with 'preserve' => ['media']
      'skip_templates' => [] # ignore pages with given templates (home is always rendered)

But here is my problem: if I activate the RewriteBase /static rule in my .htaccess file, the static website works but I canโ€™t access to the Panel anymore. And if I donโ€™t active it, obviously I can access to the Panel but the website is no longer serving the static version of it.

So how do I need to configure the config.php, the index.php and the .htaccess files so the panel is still accessible by my client and the server still serving the /static version of the website? :thinking:

Let me know if my question is not clear enough.

It doesnโ€™t say anything about htaccess changes in the pluginโ€™s readme. How do you know it doesnโ€™t serve the static site?

Also, what happens if you change 'base_url' => '/', to 'base_url' => '/static', in the config?

Thanks @VIPStephan for your answer. I changed 'base_url' => '/' to 'base_url' => '/static' as you suggested, and it makes the static version accessible via the url.

But what Iโ€™m trying to find is a way to serve the static version directly via (without the /static), and still being able to access to the back-office via How can I do it?

@timotheegoguely Interested in how you manage that at the end? Did you solve it? Iโ€™m also struggling to understand where to serve the file versus where to access the panel after changing the base_url.