OleVik / grav-plugin-static-generator

Indexing and static generation of Page(s) for Grav.
MIT License
22 stars 1 forks source link

Unclear what the static content locations mean #6

Closed SteveMcArthur closed 4 years ago

SteveMcArthur commented 4 years ago

It's not clear what the various static content locations mean. What is the difference between them? How are they supposed to be implemented?

If I want to generate a static version of my website I would expect the static location to be outside of the grav location. Perhaps "../build"

I can't really work out how to implement a static site with the current locations.

OleVik commented 4 years ago

This will be clarified and made flexible for v2.0.0. Right now the options are hard-coded to these options:

Which is to say that PHP's permissions may prevent it from placing the generated files outside of Grav, so they would likely need to be copied from the given location to where you want them.

SteveMcArthur commented 4 years ago

OK - thank you so much for responding to my issues/queries so quickly.

I assume from your response that it will be possible for users to define an output folder outside of the Grav in the new version.

However, I am still unclear as to what the existing locations mean. What is the difference between native & persist other than the folder locations?

Transient is located in the cache. Does that mean it will be used by Grav in place of its native cache?

OleVik commented 4 years ago

Yes, it will be, given that PHP can read and write to this location. By default this will be /user/data/persist, because it is inside Grav and known to be writable. Any location outside of Grav depends on how the system is set up, and if PHP can write outside of this location.

The options are just names for the locations. Eg., writing to /cache/transient means that the static copy of the site will be deleted when the cache clears. The plugin does not replace the cache-mechanism to serve the static version if needed, it purely generates the static version for use elsewhere.

OleVik commented 4 years ago

Implemented for v2.0.0-beta.1.