Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear what the static content locations mean #6

Closed
SteveMcArthur opened this issue Feb 26, 2020 · 4 comments
Closed

Unclear what the static content locations mean #6

SteveMcArthur opened this issue Feb 26, 2020 · 4 comments
Assignees

Comments

@SteveMcArthur
Copy link

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
Copy link
Owner

OleVik commented Feb 26, 2020

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

  • native for /user/plugins/static-generator/data
  • persist for /user/data/persist
  • transient for /cache/transient

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
Copy link
Author

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
Copy link
Owner

OleVik commented Feb 26, 2020

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
Copy link
Owner

OleVik commented Mar 6, 2020

Implemented for v2.0.0-beta.1.

@OleVik OleVik closed this as completed Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants