Change Path

Is it possbible to change the Pages path to another folder?

It is possible, it requires taking advantage of an undocumented feature that allows Grav’s streams to be configured via a setup.php file. This is an advanced feature, and I don’t recommend it really unless there’s a really good reason.

If you really want to do it, i’ll have to track down an example of this file. I don’t seem to have one handy on this laptop.

Hey, thanks for your reply. Yes i really want to do it. I want to save the sites and all what i need for them in a network drive. The network drive has an address like ///bku/…/…/mysites/

I want to save the main files on all my PC’s in the network and they show all the sites…

Ok, i’ll try to rustle up an example file for you. One thing you might want to consider though, it to simply use symlinks to do this? That’s how I do my development and it works fine.

Sorry for the late followup on this. I have some information for you. So turns out changing the user pages path is pretty simple and doesn’t even need the setup.php file.

Simply copy the following chunk into user/config/streams.yaml and then edit as you need:

schemes:
  page:
    type: ReadOnlyStream
    paths:
      - /my/custom/pages_folder

You can add blocks for asset and image too. Have a look in the original system/config/streams.yaml for an example.