Offline use of Kirby / Bash script to start localhost

Currently the plugin has two main features for files:

  • you can copy whole folders, including the thumbs folder for instance (and by default)
  • and/or you can copy a page’s files

It seems that none of those two approaches would work for you. How are you referencing the files for a given presentation? With hardcoded HTML <img src="/imagelib/something/some-pic.jpg">? Kirbytext? Kirby fields?

I was thinking about exposing the Builder instance to templates when building pages, or maybe only specific methods (we don’t want to be able to run the builder from a template being rendered by the builder). Maybe adding a method for adding to the array of files to copy.

So in a template you could do:

if (is_callable('staticbuilder_addasset')) {
  staticbuilder_addasset($filePath);
}

But it won’t be until a few weeks that I can work on that kind of thing.

Of course if you think the plugin already covers 90% of your needs, you could fork it to adapt it to your needs.