Home
Support Forums

Option for root path

Hi,

I just want to make sure I did not overlook something in the documentation.
Assuming my site files are contained in a subfolder in my repository, under /site.

Am I correct that every single collection (And Media Library) now has to be configured like:
folder: "/site/dir/..."?
There is no config option that lets me define the content root so to speak?

There is not. NetlifyCMS is a git based cms. In order to understand your source, you’ll have to tell it where your files are located, relative to the root of your repository, rather than the root of your site.

Yes, sorry, I should’ve mentioned my site files are located in site :slight_smile: I was talking about a global path setting that the CMS then uses as relative path for all other paths.

Hi @madsem, not sure if you can use YAML aliases for that, but if you use JS to configure the CMS you should be able to compose paths:
https://www.netlifycms.org/docs/beta-features/#manual-initialization