Data folder?

I’m learning Grav (nice work!), and it would be really helpful to see an example of using the “data” that goes in the data folder. (I couldn’t find this in the documentation.)

I’m trying to build a photo gallery with metadata and it’s a bit tedious to create a folder for every single image in a subfolder.

Any ideas? Thanks!

Data folder is unused currently. It is there in preparation for our Forms plugin that is not released yet. It will have the option of email and/or storing form data in that folder.

Of course it can be used for other things if you like, but there’s currently nothing else that uses it.

I have a follow up question, is there a data persistence api planned? I’m thinking of the best way to make a commenting system, so far I found this thread:

Which is why I’m wondering about the data folder. The other way I thought would be to create a *.xml file in the same directory the file is located for pages that have commenting enabled.

There is no persistence API planned as such, however all the necessary libraries are available to store data as YAML and/or Markdown pages.

We have discussed the possibility of a commenting or even forum-type plugin that stored data as sub-pages of the blog post being commented on. It’s theoretically possible and the methods to create and even copy or move pages are already in the Grav codebase.

Raising this question up again. How can i get a file stored in data folder? Example: A link to PDF file. PDF stored in data. OR pdf should be stored somewhere else?

The data folder is not intended to be web accessible. It’s for storing data such as form submission information. Put PDFs and things in your pages folders.

Thank you. Can i just put it to Pages directory or into 01.some dir?

In a page folder, like 01.some.

Ok, can you help me with the path for site.yaml?
url: ?