Pretty silly question, but I found no info in the docs. My question arises from the asset()
helper. If I need to pull out an asset, I need to do:
asset('assets/images/my-image.jpg')
…which is a bit confusing at first. Shouldn’t asset()
use the assets
root? It certainly makes sense to call:
asset('images/my-image.jpg')
…and get the asset? Then, I looked at the asset()
docs and the Asset
object and saw that it’s used to provide helper functionality. I thought that maybe the asset()
function generates files in the media
folder for some caching functionality. I tested it by passing my stylesheet there, but nothing happened.
To be more clear with the question, I guess, what will happen if I change the assets
root? What is it meant to contain?
In general, I think that it’d be very helpful if Kirby had a description of each folder in one place so you can quickly grasp the whole structure of a Kirby project, and by extent - of Kirby in general. For example:
content
is for the TXT files containing the content of your pages, as well as the files accompanying themsite
contains basically all site configuration
blueprints
determine the schema of your page data, as well as metadata for files and userstemplates
contains PHP files that output the corresponding HTML for each page type- …
I think something like that will be very useful to serve as the glue for the whole Guide and a good starting point in general.